I know there’s a reloadDefaultConfiguration() jmx operation, but without getting an instance of MBean and invoking this operation, is there a Logback api to reload the default configuration (optionally specifying a log configuration file path)?
I know there’s a reloadDefaultConfiguration() jmx operation, but without getting an instance of MBean
Share
This is the source code of
JMXConfigurator.reloadDefaultConfiguration():What about just running this code wherever you need it?
The only problem is the
loggerContextvariable. You can obtain it using:Unfortunately it doesn’t look like there is well-factored API to do this, what about raising an issue? Also are you aware that Logback has a built-in auto-refreshing feature?