simplify debug with using slf4j feature with {}

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1134713 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-06-11 17:55:28 +00:00
parent cd0f9ad6a7
commit 877d1d76b4
3 changed files with 4 additions and 10 deletions

View File

@ -114,10 +114,7 @@ public class BrowseAction
} }
if ( subNamespaces.size() != 1 ) if ( subNamespaces.size() != 1 )
{ {
if ( log.isDebugEnabled() ) log.debug( "{} is not collapsible as it has sub-namespaces: {}", n, subNamespaces );
{
log.debug( n + " is not collapsible as it has sub-namespaces: " + subNamespaces );
}
return n; return n;
} }
else else
@ -127,10 +124,7 @@ public class BrowseAction
Collection<String> projects = metadataResolver.resolveProjects( repositorySession, repoId, n ); Collection<String> projects = metadataResolver.resolveProjects( repositorySession, repoId, n );
if ( projects != null && !projects.isEmpty() ) if ( projects != null && !projects.isEmpty() )
{ {
if ( log.isDebugEnabled() ) log.debug( "{} is not collapsible as it has projects", n );
{
log.debug( n + " is not collapsible as it has projects" );
}
return n; return n;
} }
} }

View File

@ -148,7 +148,7 @@ public abstract class AbstractManagedRepositoriesAction
roleManager.removeTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, repoId ); roleManager.removeTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, repoId );
} }
log.debug( "removed user roles associated with repository " + repoId ); log.debug( "removed user roles associated with repository {}", repoId );
} }
protected String removeExpressions( String directory ) protected String removeExpressions( String directory )

View File

@ -310,7 +310,7 @@ public class ArchivaDavResource
{ {
String msg = String msg =
"Content Header length was " + expectedContentLength + " but was " + actualContentLength; "Content Header length was " + expectedContentLength + " but was " + actualContentLength;
log.debug( "Upload failed: " + msg ); log.debug( "Upload failed: {}", msg );
FileUtils.deleteQuietly( localFile ); FileUtils.deleteQuietly( localFile );
throw new DavException( HttpServletResponse.SC_BAD_REQUEST, msg ); throw new DavException( HttpServletResponse.SC_BAD_REQUEST, msg );