Package nl.zoidberg.calculon.util

Source Code of nl.zoidberg.calculon.util.LoggerFactory

package nl.zoidberg.calculon.util;

import java.util.logging.ConsoleHandler;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.Logger;

public class LoggerFactory {
    public static Logger getLogger() {
        Logger log = Logger.getLogger("LOG");
        log.setLevel(Level.FINE);
        Handler handler = new ConsoleHandler();
        handler.setLevel(Level.FINE);
        handler.setFormatter(new LogFormatter());

        for (Handler h : log.getHandlers()) {
            log.removeHandler(h);
        }
        log.addHandler(handler);
        return log;
    }
}
TOP

Related Classes of nl.zoidberg.calculon.util.LoggerFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.