aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-07-25 16:57:38 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-07-28 15:34:30 +0200
commit366551478d88f1a4bae483d6566706fb08bf2c0b (patch)
tree09f94f71630bd5cc5bc7a3caeeef011b608a2750 /sonar-batch
parent7b6f75a572da5bb947b004a9be2fb11c0917fb6d (diff)
downloadsonarqube-366551478d88f1a4bae483d6566706fb08bf2c0b.tar.gz
sonarqube-366551478d88f1a4bae483d6566706fb08bf2c0b.zip
SONAR-5389 Improve logging
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/SensorWrapper.java11
1 files changed, 8 insertions, 3 deletions
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)";
+ }
}