Java Utililty Methods slf4j Logger

List of utility methods to do slf4j Logger

Description

The list of methods to do slf4j Logger are organized into topic(s).

Method

voidinfo(final Logger logger, final String message)
Log info message.
Is info enabled check will be performed.
if (logger.isInfoEnabled())
    logger.info(message);
voidinfo(Logger log, Object... objectsToString)
info
if (log.isInfoEnabled()) {
    log.info(join(objectsToString));
voidinfo(Logger logger, String message, Object... objects)
info
logger.info(message, objects);
voidinfo(Logger logger, String msg)
info
if (logger == null) {
    return;
if (logger.isInfoEnabled()) {
    logger.info(msg);
voidinfo(Logger logger, String msg, Object... params)
info
if (logger.isInfoEnabled()) {
    logger.info(String.format(msg, params));
voidinfo(String format, Object... arguments)
info
info(innerGet(), format, arguments);
voidinfoLogging(Logger log, String logMessage, Object[] obj)
info Logging
log.info(logMessage, obj);
voidinfoTimeTaken(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);
voidinterruptCurrentThreadWithLog(Logger logger)
interrupt Current Thread With Log
logger.info("Thread {} was interrupted", Thread.currentThread());
Thread.currentThread().interrupt();
booleanisLoggable(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();
...