/**
 * @file HandlerExample.java
 * @author Valery Samovich
 * @version 1.0.0
 * @date 11/5/2014
 * 
 * Example of logger class with LOGGER object which is used to log messages.
 */

package com.valerysamovich.java.advanced.logger;

import java.util.logging.*;

public class HandlerExample {

    private static final Logger LOGGER = Logger.getLogger(LoggerExample.class.getName());
    
    public static void main(String[] args) {
        
        

    }

}

@@ -226,16 +226,44 @@
 ogger;%0A%0A
+import java.io.IOException;%0A
 import j
@@ -471,16 +471,816 @@
         
+/*%0A         * A ConsoleHandler records all the log messages to System.err. By %0A         * default, a Logger is associated with this handler.%0A         */%0A        Handler consoleHandler = null;%0A        %0A        /*%0A         * A FileHandler is used to record all the log messages to a specific %0A         * file or to a rotating set of files.%0A         */%0A        Handler fileHandler = null;%0A        %0A        try %7B%0A            //Creating consoleHandler and fileHandler%0A            consoleHandler = new ConsoleHandler();%0A            fileHandler  = new FileHandler(%22./javacodegeeks.log%22);%0A            %0A            //Assigning handlers to LOGGER object%0A            LOGGER.addHandler(consoleHandler);%0A            LOGGER.addHandler(fileHandler);%0A%0A        %7D catch (IOException exception) %7B%0A            %0A        %7D
 %0A%0A    %7D%0A

Modify HandlerExample.java