List of utility methods to do slf4j Logger
void | error(Logger logger, Exception e) error logger.error(e.getMessage(), e); |
void | error(String errorMessage, Throwable e) error e.printStackTrace(); error.error(errorMessage, e); |
void | error(String msg, Throwable e) error StackTraceElement se = Thread.currentThread().getStackTrace()[2]; String clazzMethod = " " + se.getClassName() + "." + se.getMethodName() + "(" + se.getFileName() + ":" + se.getLineNumber() + ") "; String log = clazzMethod + " " + " MSG: " + msg; logger.error(log, e); |
void | ExecptionLog(Logger log, String msg, Throwable e) Execption Log |
String | extractValue(String var) This method will fetch and return the value of 'var' from system variables and if not found in system variables then in environment variables. if (var != null) { if (!var.startsWith("${") || !var.endsWith("}")) { return null; var = var.replace("${", ""); var = var.substring(0, var.length() - 1); if (var != null) { if (System.getProperty(var) != null) { ... |
Marker | findMarker(Marker marker, String name) Find the marker with the given name in the given marker or its references if (marker == null) { return null; if (marker.getName().equals(name)) { return marker; } else if (marker.hasReferences()) { Iterator<?> refs = marker.iterator(); while (refs.hasNext()) { ... |
String | format(final String pattern, final @Nullable Object... arguments) format return MessageFormatter.arrayFormat(pattern, arguments).getMessage();
|
String | format(String format, Object... args) Returns a formatted string using SLF4J-style argument place holders. return MessageFormatter.arrayFormat(format, args).getMessage();
|
String | format(String messagePattern, Object... args) format FormattingTuple formattingTuple = MessageFormatter.arrayFormat(messagePattern, args);
return formattingTuple.getMessage();
|
Logger | get(Class> clazz) get return LoggerFactory.getLogger(clazz);
|