Java slf4j Logger info(String format, Object... arguments)

Here you can find the source of info(String format, Object... arguments)

Description

info

License

Apache License

Declaration

public static void info(String format, Object... arguments) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Main {

    public static void info(String format, Object... arguments) {
        info(innerGet(), format, arguments);
    }//from  w  w  w . ja  v a 2 s. co m

    public static void info(Logger log, String format, Object... arguments) {
        log.info(format, arguments);
    }

    private static Logger innerGet() {
        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
        return LoggerFactory.getLogger(stackTrace[3].getClassName());
    }
}

Related

  1. info(final Logger logger, final String message)
  2. info(Logger log, Object... objectsToString)
  3. info(Logger logger, String message, Object... objects)
  4. info(Logger logger, String msg)
  5. info(Logger logger, String msg, Object... params)
  6. infoLogging(Logger log, String logMessage, Object[] obj)
  7. infoTimeTaken(final Logger log, final long startTime, final long numItems, final String message, final Object... args)
  8. interruptCurrentThreadWithLog(Logger logger)
  9. isLoggable(final Logger logger, final Level level)