]> source.dussan.org Git - archiva.git/commitdiff
simplify debug with using slf4j feature with {}
authorOlivier Lamy <olamy@apache.org>
Sat, 11 Jun 2011 17:55:28 +0000 (17:55 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 11 Jun 2011 17:55:28 +0000 (17:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1134713 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java

index 9073be9b8e1c49e7dabcc457410fec7603bc22c2..9b3cb7f58004616da13a4c12000ed6156f9017e1 100644 (file)
@@ -114,10 +114,7 @@ public class BrowseAction
         }
         if ( subNamespaces.size() != 1 )
         {
-            if ( log.isDebugEnabled() )
-            {
-                log.debug( n + " is not collapsible as it has sub-namespaces: " + subNamespaces );
-            }
+            log.debug( "{} is not collapsible as it has sub-namespaces: {}", n, subNamespaces );
             return n;
         }
         else
@@ -127,10 +124,7 @@ public class BrowseAction
                 Collection<String> projects = metadataResolver.resolveProjects( repositorySession, repoId, n );
                 if ( projects != null && !projects.isEmpty() )
                 {
-                    if ( log.isDebugEnabled() )
-                    {
-                        log.debug( n + " is not collapsible as it has projects" );
-                    }
+                    log.debug( "{} is not collapsible as it has projects", n );
                     return n;
                 }
             }
index 356ca6a991e351bb06bcdd3b9b538bb2a6bd91b5..7dd6469635a4c4636424074225b4e0f4f1703a57 100644 (file)
@@ -148,7 +148,7 @@ public abstract class AbstractManagedRepositoriesAction
             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 )
index c4e9ff478ab4e24316fa0bead6ce28e5e922240e..c84b2cd4c1fd81107dacefedb670066c2cd0bdb2 100644 (file)
@@ -310,7 +310,7 @@ public class ArchivaDavResource
             {
                 String msg =
                     "Content Header length was " + expectedContentLength + " but was " + actualContentLength;
-                log.debug( "Upload failed: " + msg );
+                log.debug( "Upload failed: {}", msg );
 
                 FileUtils.deleteQuietly( localFile );
                 throw new DavException( HttpServletResponse.SC_BAD_REQUEST, msg );