Code example for LogManager

Methods: addLogger

0
 
    protected Logger createLoggerInternal(String name, LogManager manager) {
        Logger logger = Logger.getLogger(name);
        logger.setLevel(Level.INFO);
        logger.addHandler(createConsoleHandler());
        manager.addLogger(logger);
        return logger;
    } 
 
    private ConsoleHandler createConsoleHandler() {
        ConsoleHandler console = new ConsoleHandler();
        console.setFormatter(new JulLogFormatter());
        console.setLevel(Level.INFO);
        return console;
    } 
 
}