use of org.slf4j.helpers.FormattingTuple in project openzaly by akaxincom.
the class LogUtils method dbDebugLog.
public static void dbDebugLog(Logger logger, long startTime, Object result, String sql, Object... objects) {
String messagePattern = sql.replace("?", "{}");
FormattingTuple format = MessageFormatter.arrayFormat(messagePattern, objects);
logger.debug("[openzaly-db] cost:{}ms result:{} sql:{}", System.currentTimeMillis() - startTime, result, format.getMessage());
}
use of org.slf4j.helpers.FormattingTuple in project openzaly by akaxincom.
the class LogUtils method requestInfoLog.
public static void requestInfoLog(Logger logger, Command command, String messagePattern, Object... objects) {
FormattingTuple format = MessageFormatter.arrayFormat(messagePattern, objects);
logger.info("client={} siteUserId={} action={} msg={}", command.getClientIp(), command.getSiteUserId(), command.getAction(), command.toString(), format.getMessage());
return;
}
use of org.slf4j.helpers.FormattingTuple in project infrautils by opendaylight.
the class RememberingLogger method error.
@Override
public void error(String format, Object... arguments) {
FormattingTuple mf = MessageFormatter.arrayFormat(format, arguments);
ERRORS.add(new LogCapture(ERROR, mf.getMessage(), mf.getThrowable()));
super.error(format, arguments);
}
use of org.slf4j.helpers.FormattingTuple in project Javacord by BtoBastian.
the class JavacordLogger method debug.
@Override
public final void debug(String format, Object arg1) {
if (isDebugEnabled()) {
FormattingTuple ft = MessageFormatter.format(format, arg1);
LogRecord record = new LogRecord(Level.FINE, ft.getMessage());
record.setThrown(ft.getThrowable());
record.setLoggerName(name);
Logger.getLogger(name).log(record);
}
}
use of org.slf4j.helpers.FormattingTuple in project alien4cloud by alien4cloud.
the class FlowExecutionLog method info.
public void info(String message, Object... args) {
FormattingTuple ft = MessageFormatter.arrayFormat(message, args);
infos.add(new LogTask(ft.getMessage()));
}
Aggregations