simplify logging with using varargs from slf4j 1.7

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1384389 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-09-13 15:54:45 +00:00
parent 94156c0805
commit ad315ae5b0
1 changed files with 18 additions and 24 deletions

View File

@ -22,6 +22,7 @@ package org.apache.archiva.webdav;
import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.audit.AuditEvent;
import org.apache.archiva.audit.AuditListener;
import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
import org.apache.archiva.scheduler.ArchivaTaskScheduler;
import org.apache.archiva.scheduler.repository.RepositoryArchivaTaskScheduler;
import org.apache.archiva.scheduler.repository.RepositoryTask;
@ -52,7 +53,6 @@ import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
import org.apache.jackrabbit.webdav.property.DavPropertySet;
import org.apache.jackrabbit.webdav.property.DefaultDavProperty;
import org.apache.jackrabbit.webdav.property.ResourceType;
import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
@ -316,12 +316,10 @@ public class ArchivaDavResource
}
queueRepositoryTask( localFile );
if ( log.isDebugEnabled() )
{
log.debug(
"File '" + resource.getDisplayName() + ( exists ? "' modified " : "' created " ) + "(current user '"
+ this.principal + "')" );
}
log.debug( "File '{}{}(current user '{}')", resource.getDisplayName(),
( exists ? "' modified " : "' created " ), this.principal );
triggerAuditEvent( resource, exists ? AuditEvent.MODIFY_FILE : AuditEvent.CREATE_FILE );
}
else if ( !inputContext.hasStream() && isCollection() ) // New directory
@ -400,11 +398,10 @@ public class ArchivaDavResource
triggerAuditEvent( member, AuditEvent.REMOVE_FILE );
}
if ( log.isDebugEnabled() )
{
log.debug( ( resource.isDirectory() ? "Directory '" : "File '" ) + member.getDisplayName()
+ "' removed (current user '" + this.principal + "')" );
}
log.debug( "{}{}' removed (current user '{}')", ( resource.isDirectory() ? "Directory '" : "File '" ),
member.getDisplayName(), this.principal );
}
catch ( IOException e )
{
@ -455,11 +452,10 @@ public class ArchivaDavResource
triggerAuditEvent( remoteAddr, locator.getRepositoryId(), logicalResource, AuditEvent.MOVE_FILE );
}
if ( log.isDebugEnabled() )
{
log.debug( ( isCollection() ? "Directory '" : "File '" ) + getLocalResource().getName() + "' moved to '"
+ destination + "' (current user '" + this.principal + "')" );
}
log.debug( "{}{}' moved to '{}' (current user '{}')", ( isCollection() ? "Directory '" : "File '" ),
getLocalResource().getName(), destination, this.principal );
}
catch ( IOException e )
{
@ -495,12 +491,10 @@ public class ArchivaDavResource
triggerAuditEvent( remoteAddr, locator.getRepositoryId(), logicalResource, AuditEvent.COPY_FILE );
}
if ( log.isDebugEnabled() )
{
log.debug(
( isCollection() ? "Directory '" : "File '" ) + getLocalResource().getName() + "' copied to '"
+ destination + "' (current user '" + this.principal + "')" );
}
log.debug( "{}{}' copied to '{}' (current user '{)')", ( isCollection() ? "Directory '" : "File '" ),
getLocalResource().getName(), destination, this.principal );
}
catch ( IOException e )
{