Apply correct ordering in logging system on startup
Completes the work started in 7f687b1, where the call to
LoggingSystem.beforeInitialization() was ommitted which results
in JUL logging never being available in the application.
Partial fix for #131 (but a /refresh is still broken)
This commit is contained in:
@@ -85,11 +85,18 @@ public class BootstrapApplicationListener
|
||||
ConfigurableApplicationContext context = bootstrapServiceContext(environment,
|
||||
event.getSpringApplication());
|
||||
apply(context, event.getSpringApplication(), environment);
|
||||
shutdownLogging();
|
||||
}
|
||||
|
||||
private void shutdownLogging() {
|
||||
// Clean up the logging system. Logging will go dark until the
|
||||
// ConfigFileApplicationListener fires, but this is the price we pay for that
|
||||
// listener being able to adjust the log levels according to what it finds in its
|
||||
// own configuration.
|
||||
LoggingSystem.get(ClassUtils.getDefaultClassLoader()).cleanUp();
|
||||
LoggingSystem loggingSystem = LoggingSystem
|
||||
.get(ClassUtils.getDefaultClassLoader());
|
||||
loggingSystem.cleanUp();
|
||||
loggingSystem.beforeInitialize();
|
||||
}
|
||||
|
||||
private ConfigurableApplicationContext bootstrapServiceContext(
|
||||
|
||||
Reference in New Issue
Block a user