本文整理匯總了Java中ch.qos.logback.classic.Level.TRACE_INT屬性的典型用法代碼示例。如果您正苦於以下問題:Java Level.TRACE_INT屬性的具體用法?Java Level.TRACE_INT怎麽用?Java Level.TRACE_INT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類ch.qos.logback.classic.Level
的用法示例。
在下文中一共展示了Level.TRACE_INT屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: message
public void message(String msg, Throwable t) {
switch(level) {
case Level.TRACE_INT: {
slf4jLogger.trace(marker, msg, t);
break;
}
case Level.DEBUG_INT: {
slf4jLogger.debug(marker, msg, t);
break;
}
case Level.INFO_INT: {
slf4jLogger.info(marker, msg, t);
break;
}
case Level.WARN_INT: {
slf4jLogger.warn(marker, msg, t);
break;
}
case Level.ERROR_INT: {
slf4jLogger.error(marker, msg, t);
break;
}
}
}
示例2: decide
@Override
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) {
// cannot use logger.isEnabledFor(level), as it would cause a StackOverflowError by calling this filter again!
if(level.isGreaterOrEqual(logger.getEffectiveLevel()) && format != null) {
switch (level.toInt()) {
case Level.ERROR_INT:
errorCounter.increment();
break;
case Level.WARN_INT:
warnCounter.increment();
break;
case Level.INFO_INT:
infoCounter.increment();
break;
case Level.DEBUG_INT:
debugCounter.increment();
break;
case Level.TRACE_INT:
traceCounter.increment();
break;
}
}
return FilterReply.NEUTRAL;
}
示例3: append
@Override
protected void append(ILoggingEvent event) {
switch (event.getLevel().toInt()) {
case Level.TRACE_INT:
traceLabel.inc();
break;
case Level.DEBUG_INT:
debugLabel.inc();
break;
case Level.INFO_INT:
infoLabel.inc();
break;
case Level.WARN_INT:
warnLabel.inc();
break;
case Level.ERROR_INT:
errorLabel.inc();
break;
default:
break;
}
}
示例4: writeTo
@Override
public void writeTo(JsonGenerator generator, ILoggingEvent event) throws IOException {
String level;
switch (event.getLevel().toInt()) {
case Level.ERROR_INT:
level = "error";
break;
case Level.WARN_INT:
level = "warning";
break;
case Level.INFO_INT:
level = "info";
break;
case Level.DEBUG_INT:
level = "debug";
break;
case Level.TRACE_INT:
level = "trace";
break;
case Level.ALL_INT:
level = "all";
break;
case Level.OFF_INT:
level = "off";
break;
default:
level = "???";
}
JsonWritingUtils.writeStringField(
generator, getFieldName(), level);
}
示例5: translate
private static LogOutput.Level translate(Level level) {
switch (level.toInt()) {
case Level.ERROR_INT:
return LogOutput.Level.ERROR;
case Level.WARN_INT:
return LogOutput.Level.WARN;
case Level.INFO_INT:
return LogOutput.Level.INFO;
case Level.TRACE_INT:
return LogOutput.Level.TRACE;
case Level.DEBUG_INT:
default:
return LogOutput.Level.DEBUG;
}
}