diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-07-19 13:25:27 +0000 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-07-19 13:25:27 +0000 |
commit | c7d65715c793f962e154310aa2b1460ebcdd86b8 (patch) | |
tree | 3f1d82b74da01d991d9d87408948f4e83f076217 /src | |
parent | 7a9a76df1ca153006669091ccbbe26671dec666d (diff) | |
download | sonar-scanner-cli-c7d65715c793f962e154310aa2b1460ebcdd86b8.tar.gz sonar-scanner-cli-c7d65715c793f962e154310aa2b1460ebcdd86b8.zip |
SONARPLUGINS-2038 Log the property only in Debug mode
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/sonar/runner/Main.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/org/sonar/runner/Main.java b/src/main/java/org/sonar/runner/Main.java index dbb998a..009bf0e 100644 --- a/src/main/java/org/sonar/runner/Main.java +++ b/src/main/java/org/sonar/runner/Main.java @@ -43,6 +43,8 @@ import java.util.Properties; */ public final class Main { + private static boolean debugMode = false; + public static void main(String[] args) { long startTime = System.currentTimeMillis(); try { @@ -51,8 +53,11 @@ public final class Main { log("Runner version: " + runner.getRunnerVersion()); log("Java version: " + System.getProperty("java.version", "<unknown java version>") + ", vendor: " + System.getProperty("java.vendor", "<unknown vendor>")); - log("OS name: \"" + System.getProperty("os.name") + "\", version: \"" + System.getProperty("os.version") + "\""); - log("Arch: \"" + System.getProperty("os.arch") + "\", sun.arch.data.model: \"" + System.getProperty("sun.arch.data.model") + "\""); + log("OS name: \"" + System.getProperty("os.name") + "\", version: \"" + System.getProperty("os.version") + "\", arch: \"" + System.getProperty("os.arch") + "\""); + if (debugMode) { + log("Other system properties:"); + log(" - sun.arch.data.model: \"" + System.getProperty("sun.arch.data.model") + "\""); + } log("Server: " + runner.getServerURL()); try { log("Work directory: " + runner.getWorkDir().getCanonicalPath()); @@ -166,6 +171,7 @@ public final class Main { } else if ("-X".equals(arg) || "--debug".equals(arg)) { props.setProperty(Runner.VERBOSE, "true"); + debugMode = true; } else if ("-D".equals(arg) || "--define".equals(arg)) { i++; |