protected static final Logger initializeLogger ( ) { //get logger Logger logger = Logger . getLogger ( FaxClient . class . getName ( ) ) ; //enable all log events (fax4j logger filters out uneeded log events) logger . setLevel ( Level . ALL ) ; logger . setFilter ( null ) ; //enable to pass log events to parent loggers logger . setUseParentHandlers ( true ) ; //create handler Formatter formatter = new SimpleFormatter ( ) ; Handler handler = new StreamHandler ( System . out , formatter ) ; //set filtering handler . setLevel ( logger . getLevel ( ) ) ; handler . setFilter ( logger . getFilter ( ) ) ; //add handler logger . addHandler ( handler ) ; return logger ; }
This function initializes and returns the logger .