@Test public void warn() { LogUtils.warn(log, "event", "this is warn"); assertEquals("[event] msg=this is warn", testLogAppender.getLastMessage()); LogUtils.warn(log, "event", "this is warn {}", "arg1"); assertEquals("[event] msg=this is warn arg1", testLogAppender.getLastMessage()); LogUtils.warn(log, "event", "this is warn {} {}", "arg1", "arg2"); assertEquals("[event] msg=this is warn arg1 arg2", testLogAppender.getLastMessage()); LogUtils.warn(log, "event", "this is warn {} {}", "arg1", "arg2", new ClassNotFoundException("com.abc")); assertEquals("[event] msg=this is warn arg1 arg2", testLogAppender.getLastMessage()); assertEquals("com.abc", testLogAppender.getLastEvent().getThrowableProxy().getMessage()); LogUtils.warn(log, "event", "this is warn {}", "arg1", new Error("com.def")); assertEquals("[event] msg=this is warn arg1", testLogAppender.getLastMessage()); assertEquals("com.def", testLogAppender.getLastEvent().getThrowableProxy().getMessage()); LogUtils.warn(log, "event", "this is warn", new Exception("com.def")); assertEquals("[event] msg=this is warn", testLogAppender.getLastMessage()); assertEquals("com.def", testLogAppender.getLastEvent().getThrowableProxy().getMessage()); }
public static void warn(Logger logger, String eventName, String msg) { logger.warn(FORMAT_FOR_LOG, eventName, msg); }
LogUtils { public static void warn(Logger logger, String eventName, String msg) { logger.warn(FORMAT_FOR_LOG, eventName, msg); } }
LogUtils { public static void warn(Logger logger, String eventName, String msg) { logger.warn(FORMAT_FOR_LOG, eventName, msg); } private  LogUtils(); }
LogUtils { public static void warn(Logger logger, String eventName, String msg) { logger.warn(FORMAT_FOR_LOG, eventName, msg); } private  LogUtils(); static void debug(Logger logger, String eventName, String msg); static void debug(Logger logger, String eventName, String format, Object arg); static void debug(Logger logger, String eventName, String format, Object arg1, Object arg2); static void debug(Logger logger, String eventName, String format, Object... arguments); static void debug(Logger logger, String eventName, String msg, Throwable t); static void info(Logger logger, String eventName, String msg); static void info(Logger logger, String eventName, String format, Object arg); static void info(Logger logger, String eventName, String format, Object arg1, Object arg2); static void info(Logger logger, String eventName, String format, Object... arguments); static void info(Logger logger, String eventName, String msg, Throwable t); static void warn(Logger logger, String eventName, String msg); static void warn(Logger logger, String eventName, String format, Object arg); static void warn(Logger logger, String eventName, String format, Object arg1, Object arg2); static void warn(Logger logger, String eventName, String format, Object... arguments); static void warn(Logger logger, String eventName, String msg, Throwable t); static void error(Logger logger, String eventName, String msg); static void error(Logger logger, String eventName, String format, Object arg); static void error(Logger logger, String eventName, String format, Object arg1, Object arg2); static void error(Logger logger, String eventName, String format, Object... arguments); static void error(Logger logger, String eventName, String msg, Throwable t); }
LogUtils { public static void warn(Logger logger, String eventName, String msg) { logger.warn(FORMAT_FOR_LOG, eventName, msg); } private  LogUtils(); static void debug(Logger logger, String eventName, String msg); static void debug(Logger logger, String eventName, String format, Object arg); static void debug(Logger logger, String eventName, String format, Object arg1, Object arg2); static void debug(Logger logger, String eventName, String format, Object... arguments); static void debug(Logger logger, String eventName, String msg, Throwable t); static void info(Logger logger, String eventName, String msg); static void info(Logger logger, String eventName, String format, Object arg); static void info(Logger logger, String eventName, String format, Object arg1, Object arg2); static void info(Logger logger, String eventName, String format, Object... arguments); static void info(Logger logger, String eventName, String msg, Throwable t); static void warn(Logger logger, String eventName, String msg); static void warn(Logger logger, String eventName, String format, Object arg); static void warn(Logger logger, String eventName, String format, Object arg1, Object arg2); static void warn(Logger logger, String eventName, String format, Object... arguments); static void warn(Logger logger, String eventName, String msg, Throwable t); static void error(Logger logger, String eventName, String msg); static void error(Logger logger, String eventName, String format, Object arg); static void error(Logger logger, String eventName, String format, Object arg1, Object arg2); static void error(Logger logger, String eventName, String format, Object... arguments); static void error(Logger logger, String eventName, String msg, Throwable t);  }