本文整理汇总了Java中org.apache.log4j.Level.ALL_INT属性的典型用法代码示例。如果您正苦于以下问题:Java Level.ALL_INT属性的具体用法?Java Level.ALL_INT怎么用?Java Level.ALL_INT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.log4j.Level
的用法示例。
在下文中一共展示了Level.ALL_INT属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLogLevels
/**
* Return a long containing the encoded status of every log level for the relevant loggers.
* @return A long containing log levels for all the loggers available in the EE
*/
public final static long getLogLevels() {
long logLevels = 0;
for (int ii = 0; ii < loggers.length; ii++) {
final int level = loggers[ii].getEffectiveLevel().toInt();
switch (level) {
case Level.TRACE_INT:
logLevels |= trace << (ii * 3);
break;
case Level.ALL_INT:
logLevels |= all << (ii * 3);
break;
case Level.DEBUG_INT:
logLevels |= debug << (ii * 3);
break;
case Level.ERROR_INT:
logLevels |= error << (ii * 3);
break;
case Level.FATAL_INT:
logLevels |= fatal << (ii * 3);
break;
case Level.INFO_INT:
logLevels |= info << (ii * 3);
break;
case Level.OFF_INT:
logLevels |= off << (ii * 3);
break;
case Level.WARN_INT:
logLevels |= warn << (ii * 3);
break;
default:
throw new RuntimeException("Unhandled log level " + level);
}
}
return logLevels;
}