use of org.slf4j.helpers.FormattingTuple in project hive by apache.
the class TestLogger method trace.
@Override
public void trace(String format, Object[] argArray) {
FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
log(LEVEL.TRACE, ft.getMessage(), ft.getThrowable());
}
use of org.slf4j.helpers.FormattingTuple in project hive by apache.
the class TestLogger method warn.
@Override
public void warn(String format, Object[] argArray) {
FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
log(LEVEL.WARN, ft.getMessage(), ft.getThrowable());
}
use of org.slf4j.helpers.FormattingTuple in project ACS by ACS-Community.
the class JDK14LoggerAdapter method warn.
/**
* Log a message at level WARNING according to the specified format and
* arguments.
*
* <p>
* This form avoids superfluous object creation when the logger is disabled
* for the WARNING level.
* </p>
*
* @param format
* the format string
* @param argArray
* an array of arguments
*/
public void warn(String format, Object... argArray) {
if (logger.isLoggable(Level.WARNING)) {
FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
log(SELF, Level.WARNING, ft.getMessage(), ft.getThrowable());
}
}
use of org.slf4j.helpers.FormattingTuple in project ACS by ACS-Community.
the class JDK14LoggerAdapter method info.
/**
* Log a message at the INFO level according to the specified format and
* arguments.
*
* <p>
* This form avoids superfluous object creation when the logger is disabled
* for the INFO level.
* </p>
*
* @param format
* the format string
* @param arg1
* the first argument
* @param arg2
* the second argument
*/
public void info(String format, Object arg1, Object arg2) {
if (logger.isLoggable(Level.INFO)) {
FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
log(SELF, Level.INFO, ft.getMessage(), ft.getThrowable());
}
}
use of org.slf4j.helpers.FormattingTuple in project gradle by gradle.
the class OutputEventListenerBackedLogger 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