View Javadoc

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  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  		DOMConfigurator.configure(fileUrl);
22  	}
23  	
24  	/***
25  	 * Returns a string representation of this parser.
26  	 * @return a string representation of this parser.
27  	 */
28  	public String toString() {
29  		return "Log4J XML parser";
30  	}
31  
32  	protected ConfigurationType getConfigurationType() {
33  		return ConfigurationType.LOG4J_XML;
34  	}
35  }