-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Couldn't find a way to pass logback.configurationFile system property to the native binary. Could be fixed by introducing an environment variable LOGBACK_CONFIGURATION_FILE, in of the below two ways.
Option 1:
if (System.getProperty(PROP_LOGBACK_CONFIG) == null &&
System.getenv(ENV_LOGBACK_CONFIG) != null) {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
try {
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(context);
context.reset();
configurator.doConfigure(
Application.class.getClassLoader().getResourceAsStream(System.getenv(ENV_LOGBACK_CONFIG)));
} catch (JoranException je) {
// StatusPrinter will handle this
}
StatusPrinter.printInCaseOfErrorsOrWarnings(context);
}Option 2:
if (System.getProperty(PROP_LOGBACK_CONFIG) == null &&
System.getenv(ENV_LOGBACK_CONFIG) != null) {
System.setProperty(PROP_LOGBACK_CONFIG, System.getenv(ENV_LOGBACK_CONFIG));
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working