use of org.slf4j.helpers.FormattingTuple in project jPOS by jpos.
the class JPOSLogger method warn.
@Override
public void warn(String format, Object arg) {
if (isWarnEnabled()) {
FormattingTuple ft = MessageFormatter.format(format, arg);
log.warn(ft.getMessage());
}
}
use of org.slf4j.helpers.FormattingTuple in project jPOS by jpos.
the class JPOSLogger method info.
@Override
public void info(String format, Object... arguments) {
if (isInfoEnabled()) {
FormattingTuple ft = MessageFormatter.arrayFormat(format, arguments);
log.info(ft.getMessage());
}
}
use of org.slf4j.helpers.FormattingTuple in project knime-core by knime.
the class NodeLoggerLoggerAdapter method trace.
/**
* Log a message at level TRACE according to the specified format and
* arguments.
*
* <p>
* This form avoids superfluous object creation when the logger is disabled
* for the TRACE level.
* </p>
*
* @param format
* the format string
* @param arg1
* the first argument
* @param arg2
* the second argument
*/
@Override
public void trace(final String format, final Object arg1, final Object arg2) {
if (isDebugEnabled()) {
FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
m_nodeLogger.debug(ft.getMessage(), ft.getThrowable());
}
}
use of org.slf4j.helpers.FormattingTuple in project knime-core by knime.
the class NodeLoggerLoggerAdapter method debug.
/**
* Log a message at level DEBUG according to the specified format and
* arguments.
*
* <p>
* This form avoids superfluous object creation when the logger is disabled
* for the DEBUG level.
* </p>
*
* @param format
* the format string
* @param arg1
* the first argument
* @param arg2
* the second argument
*/
@Override
public void debug(final String format, final Object arg1, final Object arg2) {
if (m_nodeLogger.isDebugEnabled()) {
FormattingTuple ft = MessageFormatter.format(format, arg1, arg2);
m_nodeLogger.debug(ft.getMessage(), ft.getThrowable());
}
}
use of org.slf4j.helpers.FormattingTuple in project knime-core by knime.
the class NodeLoggerLoggerAdapter method info.
/**
* Log a message at level INFO 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 argArray
* an array of arguments
*/
@Override
public void info(final String format, final Object... argArray) {
if (m_nodeLogger.isInfoEnabled()) {
FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
m_nodeLogger.info(ft.getMessage(), ft.getThrowable());
}
}
Aggregations