Coverage Report - org.naftulin.configmgr.parsers.Log4JPropertiesParserImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
Log4JPropertiesParserImpl
100%
5/5
N/A
1
 
 1  
 package org.naftulin.configmgr.parsers;
 2  
 
 3  
 import java.net.URL;
 4  
 
 5  
 import org.apache.log4j.PropertyConfigurator;
 6  
 import org.naftulin.configmgr.ConfigurationType;
 7  
 
 8  
 /**
 9  
  * Initilizes log4j engine by using propertes log4j initializer.
 10  
  * 
 11  
  * @author Henry Naftulin
 12  
  * @since 1.0
 13  
  */
 14  10
 public class Log4JPropertiesParserImpl extends AbstractLog4JParser {
 15  
         private static final long serialVersionUID = 1L;
 16  
 
 17  
         /**
 18  
          * Initilizes log4j engine by using properties log4j initializer.
 19  
          */
 20  
         void doCallLog4JConfigurator(final URL fileUrl) {
 21  20
                 PropertyConfigurator.configure(fileUrl);                
 22  20
         }
 23  
         
 24  
         /**
 25  
          * Returns a string representation of this parser.
 26  
          * @return a string representation of this parser.
 27  
          */
 28  
         public String toString() {
 29  25
                 return "Log4J properties parser";
 30  
         }
 31  
 
 32  
         protected ConfigurationType getConfigurationType() {
 33  20
                 return ConfigurationType.LOG4J_PROPS;
 34  
         }
 35  
 }