//import java.io.BufferedReader; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import com.alibaba.fastjson.JSONObject; public class SetLog4j { private static final transient Logger log = Logger.getLogger(SetLog4j.class); public void loggerError(String message) { PropertyConfigurator.configure("src/log4j.properties"); log.error(message); } public void loggerInfo(String string) { PropertyConfigurator.configure("src/log4j.properties"); log.info(string); } public void loggerDebug(String message) { PropertyConfigurator.configure("src/log4j.properties"); log.debug(message); } public void loggerWarn(String message) { PropertyConfigurator.configure("src/log4j.properties"); log.warn(message); } public void loggerInfo(boolean message) { // TODO Auto-generated method stub PropertyConfigurator.configure("src/log4j.properties"); log.info(message); } public void loggerInfo(JSONObject jsonOneNode) { // TODO Auto-generated method stub PropertyConfigurator.configure("src/log4j.properties"); log.info(jsonOneNode); } public void loggerInfo(int length) { // TODO Auto-generated method stub PropertyConfigurator.configure("src/log4j.properties"); log.info(length); } public void loggerInfo(net.sf.json.JSONObject jsStr) { // TODO Auto-generated method stub PropertyConfigurator.configure("src/log4j.properties"); log.info(jsStr); } }