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