简体   繁体   中英

How to Turn off Grizzly Logging?

How can I turn off the Logging of Grizzly?

I'd like to turn off following Loggings:

Okt 18, 2018 8:42:24 AM org.glassfish.grizzly.http.server.NetworkListener start
INFORMATION: Started listener bound to [0.0.0.0:8080]
Okt 18, 2018 8:42:24 AM org.glassfish.grizzly.http.server.HttpServer start
INFORMATION: [HttpServer] Started.

Thanks in advance for any help/ advice.

I wrote an own solution - I did everything by reflection:

    Enumeration<String> loggers = LogManager.getLogManager().getLoggerNames();
    while (loggers.hasMoreElements()) {
        String loggerName = loggers.nextElement();
        if(loggerName.contains("glassfish")) {
            Logger logger = LogManager.getLogManager().getLogger(loggerName);
            logger.setLevel(Level.OFF);     
        }
    }

Consider that this will turn off all glassfish-Loggings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM