我已经编写了一个自定义日志级别的类,即INIT
import org.apache.log4j.Logger;
import org.apache.log4j.Level;
public class InitLoggingLevel extends Level {
public static final String INITLOGGING_LEVEL = "INITLOGGING";
public static final Level INIT_LOGGING = new InitLoggingLevel(
DEBUG_INT - 4, INITLOGGING_LEVEL, 7);
protected InitLoggingLevel(int level, String levelStr, int syslogEquivalent){
super(level, levelStr, syslogEquivalent);
}
}
现在我需要在log4j.properties
文件中做哪些更改?我该如何在我的Java类中使用INIT
日志级别?