List of utility methods to do slf4j Logger
void | info(final Logger logger, final String message) Log info message. Is info enabled check will be performed. if (logger.isInfoEnabled())
logger.info(message);
|
void | info(Logger log, Object... objectsToString) info if (log.isInfoEnabled()) {
log.info(join(objectsToString));
|
void | info(Logger logger, String message, Object... objects) info logger.info(message, objects); |
void | info(Logger logger, String msg) info if (logger == null) { return; if (logger.isInfoEnabled()) { logger.info(msg); |
void | info(Logger logger, String msg, Object... params) info if (logger.isInfoEnabled()) {
logger.info(String.format(msg, params));
|
void | info(String format, Object... arguments) info info(innerGet(), format, arguments); |
void | infoLogging(Logger log, String logMessage, Object[] obj) info Logging log.info(logMessage, obj); |
void | infoTimeTaken(final Logger log, final long startTime, final long numItems, final String message, final Object... args) info Time Taken final double elapsedTimeInSeconds = (((double) System.currentTimeMillis()) - startTime) / MILLIES_PER_SECOND; final double itemsPerSecond = numItems / elapsedTimeInSeconds; final String timeInformation = String.format(" - took %.2f seconds to do %d items at %.2f per second.", elapsedTimeInSeconds, numItems, itemsPerSecond); info(log, message + timeInformation, args); |
void | interruptCurrentThreadWithLog(Logger logger) interrupt Current Thread With Log logger.info("Thread {} was interrupted", Thread.currentThread());
Thread.currentThread().interrupt();
|
boolean | isLoggable(final Logger logger, final Level level) Is the desired LogLevel active? if (level == Level.INFO) { return logger.isInfoEnabled(); } else if (level == Level.SEVERE) { return logger.isErrorEnabled(); } else if (level == Level.WARNING) { return logger.isWarnEnabled(); } else if (level == Level.FINE || level == Level.FINER || level == Level.FINEST) { return logger.isDebugEnabled(); ... |