}
catch ( IOException e )
{
- log.error( "Unable to create " + filetype + " file: " + e.getMessage(), e );
+ log.error( "Unable to create {} file: {}", filetype, e.getMessage(), e );
return false;
}
}
if ( path.contains( " " ) )
{
LoggerFactory.getLogger( AbstractRepositoryPurgeTest.class.getName() ).error(
- "You are building and testing with a path: \n " + path + " containing space. Consider relocating." );
+ "You are building and testing with a path: \n {} containing space. Consider relocating.", path );
return path.replaceAll( " ", "&20" );
}
return path;
}
catch ( TaskQueueException e )
{
- log.error( "Error queueing task: " + task + ": " + e.getMessage(), e );
+ log.error( "Error queueing task: {}: {}", task, e.getMessage(), e );
}
}
logger.info("thread1 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread2 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread3 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread4 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread5 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread6 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread7 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread8 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread9 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
logger.info("thread10 ok");
success.incrementAndGet();
} catch (Throwable e) {
- logger.error("Error occured " + e.getMessage());
+ logger.error("Error occured {}", e.getMessage());
e.printStackTrace();
throw e;
}
try {
Files.copy(largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
- logger.warn("Copy failed "+e.getMessage());
+ logger.warn("Copy failed {}", e.getMessage());
// On windows a FileSystemException is thrown
// We ignore this
}
lock = fileLockManager.writeFileLock(file);
} catch (FileSystemException ex) {
- logger.error("Exception from filesystem "+ex.getMessage());
+ logger.error("Exception from filesystem {}", ex.getMessage());
ex.printStackTrace();
throw ex;
}
"Transfer error from repository {} for resource {}, continuing to next repository. Error message: {}",
targetRepository.getRepository().getId(), path, e.getMessage() );
log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ),
- "Transfer error from repository \"" + targetRepository.getRepository().getId()
- + "\" for resource " + path + ", continuing to next repository. Error message: {}",
- e.getMessage(), e
- );
+ "Transfer error from repository \"{}"
+ + "\" for resource {}, continuing to next repository. Error message: {}",
+ targetRepository.getRepository().getId(), path, e.getMessage(), e );
}
catch ( RepositoryAdminException e )
{
}
catch ( TaskQueueException e )
{
- log.error( "Unable to queue repository task to execute consumers on resource file ['" + localFile.getName()
- + "']." );
+ log.error( "Unable to queue repository task to execute consumers on resource file ['{}"
+ + "'].", localFile.getName() );
}
}
if ( path.contains( SPACE ) )
{
LoggerFactory.getLogger( AbstractRepositoryAdminTest.class.getName() ).error(
- "You are building and testing with {appserver.base}: \n " + path
- + " containing space. Consider relocating." );
+ "You are building and testing with {appserver.base}: \n {}"
+ + " containing space. Consider relocating.", path );
}
return path.replaceAll( SPACE, "&20" );
}
/* Intentionally Catch all exceptions.
* So that the discoverer processing can continue.
*/
- log.error( "Consumer [" + id + "] had an error when processing file ["
- + basefile.getAbsolutePath() + "]: " + e.getMessage(), e );
+ log.error( "Consumer [{}] had an error when processing file ["
+ + "{}]: {}", id, basefile.getAbsolutePath(), e.getMessage(), e );
}
}
}
}
catch ( RepositoryAdminException e )
{
- log.error( "Error occurred while creating context: " + e.getMessage() );
+ log.error( "Error occurred while creating context: {}", e.getMessage() );
throw new TaskExecutionException( "Error occurred while creating context: " + e.getMessage(), e );
}
}
}
catch ( IOException e )
{
- log.error( "Error occurred while executing indexing task '" + indexingTask + "': " + e.getMessage(),
+ log.error( "Error occurred while executing indexing task '{}': {}", indexingTask, e.getMessage(),
e );
throw new TaskExecutionException( "Error occurred while executing indexing task '" + indexingTask + "'",
e );
}
catch ( IOException e )
{
- log.error( "Error occurred while executing indexing task '" + indexingTask + "': " + e.getMessage() );
+ log.error( "Error occurred while executing indexing task '{}': {}", indexingTask, e.getMessage() );
throw new TaskExecutionException( "Error occurred while executing indexing task '" + indexingTask + "'",
e );
}
}
catch ( IOException e )
{
- log.warn( "skip error loading properties {}", resourceName.toString() );
+ log.warn( "skip error loading properties {}", resourceName );
}
return fromProperties( properties );
{
sb.append( repoType ).append( "|" );
}
- log.debug( "getAdminPlugins: {}", sb.toString() );
+ log.debug( "getAdminPlugins: {}", sb );
if ( sb.length() > 1 )
{
adminPlugins = sb.substring( 0, sb.length() - 1 );
}
catch ( AuthorizationException e )
{
- log.error( "error reading permission: " + e.getMessage(), e );
+ log.error( "error reading permission: {}", e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
catch ( AuthorizationException e )
{
- log.error( "error reading permission: " + e.getMessage(), e );
+ log.error( "error reading permission: {}", e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(), e );
}
if ( StringUtils.isEmpty( artifactSourcePath ) )
{
- log.error( "cannot find artifact " + artifactTransferRequest.toString() );
+ log.error( "cannot find artifact {}", artifactTransferRequest );
throw new ArchivaRestServiceException( "cannot find artifact " + artifactTransferRequest.toString(),
null );
}
if ( !artifactFile.exists() )
{
- log.error( "cannot find artifact " + artifactTransferRequest.toString() );
+ log.error( "cannot find artifact {}", artifactTransferRequest );
throw new ArchivaRestServiceException( "cannot find artifact " + artifactTransferRequest.toString(),
null );
}
}
catch ( RepositoryException e )
{
- log.error( "RepositoryException: " + e.getMessage(), e );
+ log.error( "RepositoryException: {}", e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(), e );
}
catch ( RepositoryAdminException e )
{
- log.error( "RepositoryAdminException: " + e.getMessage(), e );
+ log.error( "RepositoryAdminException: {}", e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(), e );
}
catch ( IOException e )
{
- log.error( "IOException: " + e.getMessage(), e );
+ log.error( "IOException: {}", e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(), e );
}
return true;
}
catch ( TaskQueueException e )
{
- log.error( "Unable to queue repository task to execute consumers on resource file ['" + localFile.getName()
- + "']." );
+ log.error( "Unable to queue repository task to execute consumers on resource file ['{}"
+ + "'].", localFile.getName() );
}
}
}
catch ( TaskQueueException e )
{
- log.error( "Unable to queue repository task to execute consumers on resource file ['" + localFile.getName()
- + "']." );
+ log.error( "Unable to queue repository task to execute consumers on resource file ['{}"
+ + "'].", localFile.getName() );
}
}
}
catch ( InvalidNameException e )
{
- log.error("Error during initialization of LdapConnectionFactory "+e.getMessage(),e);
+ log.error( "Error during initialization of LdapConnectionFactory {}", e.getMessage(), e );
// throw new RuntimeException( "Error while initializing connection factory.", e );
}
catch ( RepositoryAdminException e )
}
catch ( RepositoryAdminException e )
{
- log.error("Error during repository initialization "+e.getMessage(),e);
+ log.error( "Error during repository initialization {}", e.getMessage(), e );
// throw new AuthenticationException( e.getMessage(), e );
}
}
catch ( RoleManagerException e )
{
// Log error.
- log.error( "Unable to create roles for configured repositories: " + e.getMessage(), e );
+ log.error( "Unable to create roles for configured repositories: {}", e.getMessage(), e );
}
}
}
catch ( TaskQueueException e )
{
- log.error( "Unable to queue repository task to execute consumers on resource file ['" + localFile.getName()
- + "']." );
+ log.error( "Unable to queue repository task to execute consumers on resource file ['{}"
+ + "'].", localFile.getName() );
}
}
}
}
catch ( IOException e )
{
- log.error( "Unable to load mime map " + resourceName + " : " + e.getMessage(), e );
+ log.error( "Unable to load mime map {} : {}", resourceName, e.getMessage(), e );
}
}
}
catch ( IOException e )
{
- log.error( "Unable to read mime types from input stream : " + e.getMessage(), e );
+ log.error( "Unable to read mime types from input stream : {}", e.getMessage(), e );
}
}
}
catch ( ParseException e )
{
- log.error( "Invalid audit event found in the metadata repository: " + e.getMessage() );
+ log.error( "Invalid audit event found in the metadata repository: {}", e.getMessage() );
// continue and ignore this one
}
}
{ // ensure keyspace exists, here if the keyspace doesn't exist we suppose nothing exist
if ( cluster.describeKeyspace( keyspaceName ) == null )
{
- logger.info( "Creating Archiva Cassandra '" + keyspaceName + "' keyspace." );
+ logger.info( "Creating Archiva Cassandra '{}' keyspace.", keyspaceName );
cluster.addKeyspace( HFactory.createKeyspaceDefinition( keyspaceName, //
ThriftKsDef.DEF_STRATEGY_CLASS, //
replicationFactor, //
MetadataFacetFactory factory = metadataFacetFactories.get( facetId );
if ( factory == null )
{
- log.error( "Attempted to load unknown artifact metadata facet: " + facetId );
+ log.error( "Attempted to load unknown artifact metadata facet: {}", facetId );
}
else
{
getJcrSession().save();
} catch ( InvalidItemStateException e ) {
// olamy this might happen when deleting a repo while is under scanning
- log.warn( "skip InvalidItemStateException:" + e.getMessage(), e );
+ log.warn( "skip InvalidItemStateException:{}", e.getMessage(), e );
}
catch ( RepositoryException e )
{
MetadataFacetFactory factory = metadataFacetFactories.get( name );
if ( factory == null )
{
- log.error( "Attempted to load unknown project version metadata facet: " + name );
+ log.error( "Attempted to load unknown project version metadata facet: {}", name );
}
else
{
}
catch ( ParseException e )
{
- log.error( "Invalid scan result found in the metadata repository: " + e.getMessage() );
+ log.error( "Invalid scan result found in the metadata repository: {}", e.getMessage() );
// continue and ignore this one
}
}