Fix daemon logging system

This commit is contained in:
Guillaume Nodet
2020-12-09 14:57:16 +01:00
parent b6a1f40b1b
commit 3b13c88c02
3 changed files with 5 additions and 3 deletions

View File

@@ -207,7 +207,7 @@ public class DaemonParameters {
}
public Path logbackConfigurationPath() {
return property(Environment.LOGBACK_CONFIGURATION_FILE)
return property(Environment.MVND_LOGBACK)
.orDefault(() -> mvndHome().resolve("conf/logback.xml").toString())
.orFail()
.asPath();

View File

@@ -60,7 +60,9 @@ public enum Environment {
/**
* The location of the Logback configuration file the daemon should use to configure its logging.
*/
LOGBACK_CONFIGURATION_FILE("logback.configurationFile", null, null, OptionType.PATH, Flags.NONE),
MVND_LOGBACK("mvnd.logback", null, null, OptionType.PATH, Flags.NONE),
/** The system property expected by logback to set the configuration file */
LOGBACK_CONFIGURATION_FILE("logback.configurationFile", null, null, OptionType.PATH, Flags.INTERNAL),
//
// System properties

View File

@@ -37,7 +37,7 @@ public class TestParameters extends DaemonParameters {
.put(Environment.JAVA_HOME, javaHome)
.put(Environment.MAVEN_REPO_LOCAL, localMavenRepository)
.put(Environment.MAVEN_SETTINGS, settings)
.put(Environment.LOGBACK_CONFIGURATION_FILE, logbackConfigurationPath)
.put(Environment.MVND_LOGBACK, logbackConfigurationPath)
.put(Environment.MVND_IDLE_TIMEOUT, TimeUtils.printDuration(idleTimeout))
.put(Environment.MVND_KEEP_ALIVE, TimeUtils.printDuration(keepAlive))
.put(Environment.MVND_MAX_LOST_KEEP_ALIVE, maxLostKeepAlive)