From 366551478d88f1a4bae483d6566706fb08bf2c0b Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Fri, 25 Jul 2014 16:57:38 +0200 Subject: SONAR-5389 Improve logging --- .../src/main/java/org/sonar/batch/scan/SensorWrapper.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sonar-batch') diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java b/sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java index 4deeaa0cf97..b5929008269 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java @@ -38,11 +38,11 @@ public class SensorWrapper implements org.sonar.api.batch.Sensor { private DefaultSensorDescriptor descriptor; private AnalyzerOptimizer optimizer; - public SensorWrapper(Sensor analyzer, SensorContext adaptor, AnalyzerOptimizer optimizer) { - this.analyzer = analyzer; + public SensorWrapper(Sensor newSensor, SensorContext adaptor, AnalyzerOptimizer optimizer) { + this.analyzer = newSensor; this.optimizer = optimizer; descriptor = new DefaultSensorDescriptor(); - analyzer.describe(descriptor); + newSensor.describe(descriptor); this.adaptor = adaptor; } @@ -65,4 +65,9 @@ public class SensorWrapper implements org.sonar.api.batch.Sensor { public void analyse(Project module, org.sonar.api.batch.SensorContext context) { analyzer.execute(adaptor); } + + @Override + public String toString() { + return descriptor.name() + " (wrapped)"; + } } -- cgit v1.2.3