aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2024-05-06 15:48:11 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2024-05-07 13:04:55 +0200
commitf2df80dbd277ffa97d2d43f8e44368944d3e1e4b (patch)
tree23762f8e8f545df1ec65da0e910a7ca98888da0e /src/main
parent3f3dfbe7907f6e2c0efe2d1b2a515db234cb65da (diff)
downloadsonar-scanner-cli-f2df80dbd277ffa97d2d43f8e44368944d3e1e4b.tar.gz
sonar-scanner-cli-f2df80dbd277ffa97d2d43f8e44368944d3e1e4b.zip
Update to the latest scanner-java-library
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Conf.java4
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java2
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Slf4jLogOutput.java50
3 files changed, 3 insertions, 53 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Conf.java b/src/main/java/org/sonarsource/scanner/cli/Conf.java
index b1cbe62..47f431f 100644
--- a/src/main/java/org/sonarsource/scanner/cli/Conf.java
+++ b/src/main/java/org/sonarsource/scanner/cli/Conf.java
@@ -81,8 +81,8 @@ class Conf {
return resolver.resolve();
}
- private Map<String, String> loadEnvironmentProperties() {
- return EnvironmentConfig.load(new Slf4jLogOutput());
+ private static Map<String, String> loadEnvironmentProperties() {
+ return EnvironmentConfig.load();
}
private Properties loadGlobalProperties() {
diff --git a/src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java b/src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java
index 63ee9d0..a0983d9 100644
--- a/src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java
+++ b/src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java
@@ -38,7 +38,7 @@ class ScannerEngineBootstrapperFactory {
}
ScannerEngineBootstrapper newScannerEngineBootstrapper(String appName, String appVersion) {
- return ScannerEngineBootstrapper.create(appName, appVersion, new Slf4jLogOutput());
+ return ScannerEngineBootstrapper.create(appName, appVersion);
}
diff --git a/src/main/java/org/sonarsource/scanner/cli/Slf4jLogOutput.java b/src/main/java/org/sonarsource/scanner/cli/Slf4jLogOutput.java
deleted file mode 100644
index 2ce5cba..0000000
--- a/src/main/java/org/sonarsource/scanner/cli/Slf4jLogOutput.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * SonarScanner CLI
- * Copyright (C) 2011-2024 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonarsource.scanner.cli;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.sonarsource.scanner.lib.LogOutput;
-
-public class Slf4jLogOutput implements LogOutput {
-
- private static final Logger LOG = LoggerFactory.getLogger(Slf4jLogOutput.class);
-
- @Override
- public void log(String s, Level level) {
- switch (level) {
- case TRACE:
- LOG.trace(s);
- break;
- case DEBUG:
- LOG.debug(s);
- break;
- case INFO:
- LOG.info(s);
- break;
- case WARN:
- LOG.warn(s);
- break;
- case ERROR:
- LOG.error(s);
- break;
- }
- }
-}