Reputation: 782
Using jetty + solr 4.4 + log4j I changed the logging level configuration using the solr gui and I'd like to extract this configuration so I can make that permanent when provisioning new machines.
If this configuration persist (stopping and starting the jetty server renders the modified configuration in the gui), but how can I find where does it get saved?
Upvotes: 0
Views: 150
Reputation: 52799
The settings are not persistent and just modified dynamically at runtime.
So you have to set the log levels accordingly into the log properties and use it.
LogLevelSelection class handles change in the log levels and sets the level.
Relevant code :-
Logger logger;
LogManager logManager = LogManager.getLogManager();
if ("root".equals(name)) {
logger = logManager.getLogger("");
} else logger = logManager.getLogger(name);
if ("unset".equals(value)) {
if ((logger != null) && (logger.getLevel() != null)) {
logger.setLevel(null);
log.info("Unset log level on '" + name + "'.");
}
} else {
Level level = Level.parse(value);
if (logger == null) logger = Logger.getLogger(name);
if (logger.getLevel() != level) {
logger.setLevel(level);
log.info("Set '" + name + "' to " +
level + " level.");
}
}
Upvotes: 1