package com.Sample1.intelliquity.Crypto.helper.logger;
import org.apache.log4j.PropertyConfigurator;
import org.testng.log4testng.Logger;
public class LoggerHelper {
private static boolean root = false;
public static Logger getLogger(Class cls) {
if (root) {
return Logger.getLogger(cls);
}
PropertyConfigurator.configure("C://Users//admin//Workspace1//Sample1//src//main//resources//configfile//log4j.properties");
root = true;
return Logger.getLogger(cls);
}
public static void main(String[] args){
Logger log =LoggerHelper.getLogger(LoggerHelper.class);
log.info( "logger is configured");
log.info( "logger is configured");
log.info( "logger is configured");
}
}
log4j:ERROR找不到键log4j.appender.FILE的值 log4j:ERROR无法实例化名为“ FILE”的追加程序。 log4j:错误 找不到键log4j.appender.stdout的值log4j:错误 没有实例化名为“ st
的附加程序