List of utility methods to do slf4j Logger
void | warn(String message) Prints given message in warn level by a logger instance of caller class. warn(getLoggerInstance(getCallerClassName()), message); |
void | warn(String msg) warn StackTraceElement se = Thread.currentThread().getStackTrace()[2]; String clazzMethod = " " + se.getClassName() + "." + se.getMethodName() + "(" + se.getFileName() + ":" + se.getLineNumber() + ") "; String log = clazzMethod + " " + " MSG: " + msg; logger.warn(log); |
void | warn(String msg) warn logger.warn(msg); |
void | warnOrDebug(Logger logger, String msg) warn Or Debug warnOrDebug(logger, msg, null); |
Runnable | wrapWithMDC(Runnable r) wrap With MDC Map<String, String> mdc = MDC.getCopyOfContextMap(); return () -> { Map<String, String> oldMdc = MDC.getCopyOfContextMap(); if (mdc == null) { MDC.clear(); } else { MDC.setContextMap(mdc); try { r.run(); } finally { if (oldMdc == null) { MDC.clear(); } else { MDC.setContextMap(oldMdc); }; |
void | writeErrorLog(String cont) write Error Log GATELOG_ERROR.error(cont); |