use of org.slf4j.helpers.FormattingTuple in project killbill by killbill.
the class SpyLogger method formatAndSave.
private void formatAndSave(String logLevel, String format, Object arg1, Object arg2) {
FormattingTuple tp = MessageFormatter.format(format, arg1, arg2);
save(logLevel, tp.getMessage(), tp.getThrowable());
}
use of org.slf4j.helpers.FormattingTuple in project jfinal by jfinal.
the class Slf4jLog method error.
public void error(String format, Object... args) {
if (isErrorEnabled()) {
FormattingTuple ft = MessageFormatter.arrayFormat(format, args);
log.log(null, callerFQCN, LocationAwareLogger.ERROR_INT, ft.getMessage(), NULL_ARGS, ft.getThrowable());
}
}
use of org.slf4j.helpers.FormattingTuple in project new-cloud by xie-summer.
the class SimpleLogger method entry.
/**
* Log method entry.
*
* @param argArray supplied parameters
*/
public void entry(Object... argArray) {
if (instanceofLAL && logger.isTraceEnabled(ENTRY_MARKER)) {
String messagePattern = null;
if (argArray.length < ENTRY_MESSAGE_ARRAY_LEN) {
messagePattern = ENTRY_MESSAGE_ARRAY[argArray.length];
} else {
messagePattern = buildMessagePattern(argArray.length);
}
FormattingTuple tp = MessageFormatter.arrayFormat(messagePattern, argArray);
((LocationAwareLogger) logger).log(ENTRY_MARKER, FQCN, LocationAwareLogger.TRACE_INT, tp.getMessage(), argArray, tp.getThrowable());
}
}
use of org.slf4j.helpers.FormattingTuple in project new-cloud by xie-summer.
the class JsonLogger method entry.
/**
* Log method entry.
*
* @param argArray
* supplied parameters
*/
public void entry(Object... argArray) {
if (instanceofLAL && logger.isTraceEnabled(ENTRY_MARKER)) {
String messagePattern = null;
if (argArray.length < ENTRY_MESSAGE_ARRAY_LEN) {
messagePattern = ENTRY_MESSAGE_ARRAY[argArray.length];
} else {
messagePattern = buildMessagePattern(argArray.length);
}
FormattingTuple tp = MessageFormatter.arrayFormat(messagePattern, argArray);
((LocationAwareLogger) logger).log(ENTRY_MARKER, FQCN, LocationAwareLogger.TRACE_INT, tp.getMessage(), argArray, tp.getThrowable());
}
}
use of org.slf4j.helpers.FormattingTuple in project gradle by gradle.
the class BuildOperationAwareLogger method log.
private void log(LogLevel logLevel, Throwable throwable, String format, Object[] args) {
FormattingTuple tuple = MessageFormatter.arrayFormat(format, args);
Throwable loggedThrowable = throwable == null ? tuple.getThrowable() : throwable;
log(logLevel, loggedThrowable, tuple.getMessage());
}
Aggregations