1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-01 21:52:12 +01:00

Print log4j store directory only when operating in GUI mode (#9695)

This fixes CommandLineTest.testCommandLineVersion()

Looks like the test was broken by the System.out.println statement in Base.java
824567d763
This commit is contained in:
Thomas 2020-02-07 18:57:15 +01:00 committed by GitHub
parent b59c91ebe2
commit f62b5db908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,9 +207,6 @@ public class Base {
BaseNoGui.getPlatform().init(); BaseNoGui.getPlatform().init();
BaseNoGui.initPortableFolder(); BaseNoGui.initPortableFolder();
// This configure the logs root folder
System.out.println("Set log4j store directory " + BaseNoGui.getSettingsFolder().getAbsolutePath());
System.setProperty("log4j.dir", BaseNoGui.getSettingsFolder().getAbsolutePath());
// Look for a possible "--preferences-file" parameter and load preferences // Look for a possible "--preferences-file" parameter and load preferences
BaseNoGui.initParameters(args); BaseNoGui.initParameters(args);
@ -218,6 +215,12 @@ public class Base {
parser.parseArgumentsPhase1(); parser.parseArgumentsPhase1();
commandLine = !parser.isGuiMode(); commandLine = !parser.isGuiMode();
// This configure the logs root folder
if (parser.isGuiMode()) {
System.out.println("Set log4j store directory " + BaseNoGui.getSettingsFolder().getAbsolutePath());
}
System.setProperty("log4j.dir", BaseNoGui.getSettingsFolder().getAbsolutePath());
BaseNoGui.checkInstallationFolder(); BaseNoGui.checkInstallationFolder();
// If no path is set, get the default sketchbook folder for this platform // If no path is set, get the default sketchbook folder for this platform