forked from JavaTX/JavaCompilerCore
36 lines
634 B
Java
Executable File
36 lines
634 B
Java
Executable File
package mycompiler.test;
|
|
|
|
import de.dhbwstuttgart.logger.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;
|
|
}
|
|
|
|
}
|
|
|
|
}
|