Code example for FileHandler

Methods: setFormatter

0
        this.bungee = bungee;
        this.writer = new ColouredWriter( bungee.getConsoleReader() );
 
        try 
        { 
            FileHandler handler = new FileHandler( "proxy.log", 1 << 24, 8, true );
            handler.setFormatter( formatter );
            addHandler( handler );
        } catch ( IOException ex )
        { 
            System.err.println( "Could not register logger!" );
            ex.printStackTrace();
        } 
        dispatcher.start();
    } 
 
    @Override 
    public void log(LogRecord record)
    { 
        dispatcher.queue( record );