aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-consumers
diff options
context:
space:
mode:
authorDaniel Trebbien <dtrebbien@gmail.com>2017-07-30 13:26:05 -0700
committerDaniel Trebbien <dtrebbien@gmail.com>2017-07-30 13:26:05 -0700
commit0b15664f1c667c6bab69d44ffa6f5cf966ae38cf (patch)
tree77d5449f9d5d35d44f1f43524e0db18c2e511924 /archiva-modules/archiva-base/archiva-consumers
parentf637c02c714952a88b999d00ecf78bb18975d0d1 (diff)
downloadarchiva-0b15664f1c667c6bab69d44ffa6f5cf966ae38cf.tar.gz
archiva-0b15664f1c667c6bab69d44ffa6f5cf966ae38cf.zip
Utilize parameterized logging and remove toString() calls
As suggested in the SLF4J FAQ: https://www.slf4j.org/faq.html#logging_performance .. parameterized logging can improve the efficiency of logger calls when logging at the specified level is disabled. In addition, per the FAQ: https://www.slf4j.org/faq.html#paramException since SLF4J 1.6.0 it is possible to use parameterized logging and also log an exception/throwable. toString() is called automatically: https://www.slf4j.org/faq.html#string_contents These changes were suggested by SLF4J Helper for NetBeans IDE: http://plugins.netbeans.org/plugin/72557/
Diffstat (limited to 'archiva-modules/archiva-base/archiva-consumers')
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java
index 9412ac73c..1a997eea7 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java
@@ -144,7 +144,7 @@ public abstract class AbstractRepositoryPurgeTest
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( " ", "&amp;20" );
}
return path;
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
index aa999bd6f..66f067f34 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
@@ -219,7 +219,7 @@ public class NexusIndexerConsumer
}
catch ( TaskQueueException e )
{
- log.error( "Error queueing task: " + task + ": " + e.getMessage(), e );
+ log.error( "Error queueing task: {}: {}", task, e.getMessage(), e );
}
}