Code example for ConsoleHandler

Methods: setFormattersetLevel

0
    /** 
     * @param args the command line arguments 
     */ 
    public static void main(String[] args) {
        final Logger LOGGER = Logger.getLogger(PLC.class.getName());
        final Handler consoleHandler = new ConsoleHandler();
        consoleHandler.setLevel(Level.ALL);
        consoleHandler.setFormatter(new SimpleFormatter());
         
        LOGGER.addHandler(consoleHandler);
        LOGGER.setLevel(Level.ALL);
        Locale locale = Locale.getDefault();
        LOGGER.log(Level.INFO, "Actual locale: {0}", locale);
         
         
        Window w = new Window(LOGGER, locale);
        w.setVisible(true);
         
        Thread t = new Thread(new PLCCore());
        //t.start(); 
Stop searching for code, let great code find you!  Add Codota to your java IDE