List of utility methods to do slf4j Logger
Logger | getClassLogger() Returns a logger for the calling class or context. StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
StackTraceElement element = stacktrace[2];
String name = element.getClassName();
return LoggerFactory.getLogger(name);
|
String | getErrorMsg(String format, Object[] argArray) get Error Msg FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
return ft.getMessage();
|
int | getIntValue(String strVal, int defVal) get Int Value try { return Integer.parseInt(strVal); } catch (Exception exp) { log.error("Invalid int value : " + strVal); return defVal; |
Logger | getLog(Class clazz) get Log return LoggerFactory.getLogger(getLogCategory(clazz));
|
Logger | getLogger() get Logger return logger;
|
Logger | getLogger() get Logger Logger logger = currentLoggerMap.get(); if (null == logger) { return defaultLogger; } else { return logger; |
Logger | getLogger() get Logger final Throwable t = new Throwable(); t.fillInStackTrace(); final String clazz = t.getStackTrace()[1].getClassName(); return LoggerFactory.getLogger(clazz); |
Logger | getLogger(Class clazz) Gets the logger from the servicelocator return LoggerFactory.getLogger(clazz);
|
Logger | getLogger(Class clazz) get Logger Logger ret = loggerCache.get(clazz); if (ret == null) { ret = LoggerFactory.getLogger(clazz); loggerCache.put(clazz, ret); return ret; |
Logger | getLogger(Class> clazz) get Logger return LoggerFactory.getLogger(clazz);
|