JavaTXCompilerInJavaTX/test/mycompiler/test/Log4jWrapper.java
2013-10-18 13:33:46 +02:00

36 lines
627 B
Java
Executable File

package mycompiler.test;
import org.apache.log4j.xml.DOMConfigurator;
/**
* needed to assure one-time execution of configure script
* @author tom
*
*/
public class Log4jWrapper {
private static Log4jWrapper instance=null;
private static boolean log4jInit=false;
private Log4jWrapper() {
}
public static Log4jWrapper getInstance() {
if (instance==null) {
instance=new Log4jWrapper();
}
return instance;
}
public void configureLog4j() {
if (!this.log4jInit){
DOMConfigurator.configure("test/log4jTesting.xml");
DOMConfigurator.configure("log4j.xml");
this.log4jInit=true;
}
}
}