maia_modificado/.svn/pristine/fc/fcfe68b5d287830d9d824feb551...

33 lines
729 B
Plaintext
Executable File

package com.fp.common.logger;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
public class APPLogger extends Logger {
private static boolean monitorInit=false;
public APPLogger(String name) {
super(name);
}
public static Logger getLogger(String name) {
Logger logger=Logger.getLogger(name);//, factory);
return logger;
}
public static Logger getLogger() {
Exception e=new Exception();
StackTraceElement el=e.getStackTrace()[1];
if(!monitorInit){
PropertyConfigurator.configureAndWatch("log4j.properties");
monitorInit=true;
}
return getLogger(el.getClassName());
}
public void error(Object arg0) {
super.error(arg0);
}
}