enable SEVERE log messages if no config file specified
This commit is contained in:
@@ -35,11 +35,11 @@ class Initialize extends AbstractLifecycleHandler {
|
|||||||
void execute() {
|
void execute() {
|
||||||
|
|
||||||
if (System.getProperty("java.util.logging.config.file") == null) {
|
if (System.getProperty("java.util.logging.config.file") == null) {
|
||||||
log.info("No config file specified, so turning off logging")
|
log.info("No config file specified, so turning off most logging")
|
||||||
def names = LogManager.getLogManager().getLoggerNames()
|
def names = LogManager.getLogManager().getLoggerNames()
|
||||||
while(names.hasMoreElements()) {
|
while(names.hasMoreElements()) {
|
||||||
def name = names.nextElement()
|
def name = names.nextElement()
|
||||||
LogManager.getLogManager().getLogger(name).setLevel(Level.OFF)
|
LogManager.getLogManager().getLogger(name).setLevel(Level.SEVERE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user