use of org.slf4j.helpers.FormattingTuple in project hive by apache.
the class TestLogger method trace.
@Override
public void trace(String format, Object arg1, Object arg2) {
FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
log(LEVEL.TRACE, ft.getMessage(), ft.getThrowable());
}
use of org.slf4j.helpers.FormattingTuple in project hive by apache.
the class TestLogger method info.
@Override
public void info(String format, Object arg1, Object arg2) {
FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
log(LEVEL.INFO, ft.getMessage(), ft.getThrowable());
}
use of org.slf4j.helpers.FormattingTuple in project sling by apache.
the class TracerContext method logWithLoggerName.
private FormattingTuple logWithLoggerName(String loggerName, String format, Object... params) {
FormattingTuple tuple = MessageFormatter.arrayFormat(format, params);
String msg = tuple.getMessage();
msg = "[" + loggerName + "] " + msg;
if (progressTracker == null) {
if (buffer == null) {
buffer = new CyclicBuffer<String>(LOG_BUFFER_SIZE);
}
buffer.add(msg);
} else {
progressTracker.log(msg);
}
return tuple;
}
use of org.slf4j.helpers.FormattingTuple in project hive by apache.
the class TestLogger method error.
@Override
public void error(String format, Object arg) {
FormattingTuple ft = MessageFormatter.format(format, arg);
log(LEVEL.ERROR, ft.getMessage(), ft.getThrowable());
}
use of org.slf4j.helpers.FormattingTuple in project openzaly by akaxincom.
the class LogUtils method info.
public static void info(org.apache.log4j.Logger logger, String messagePattern, Object object) {
FormattingTuple format = MessageFormatter.format(messagePattern, object);
logger.info(format.getMessage());
}
Aggregations