Java slf4j Logger info(final Logger log, final String message, final Object... args)

Here you can find the source of info(final Logger log, final String message, final Object... args)

Description

info

License

Apache License

Declaration

public static void info(final Logger log, final String message, final Object... args) 

Method Source Code


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

import org.slf4j.Logger;

public class Main {
    public static void info(final Logger log, final String message, final Object... args) {
        log.info(getFormattedMessage(message, args));
    }/* w w  w . j  av a 2 s .co  m*/

    private static String getFormattedMessage(final String message, final Object... args) {
        String formattedMessage = message;
        if (args != null && args.length > 0) {
            formattedMessage = String.format(message, args);
        }
        return formattedMessage;
    }
}

Related

  1. getLong(Properties config, String key, long defaultValue)
  2. getMessage(String message, Object... args)
  3. getTraceLevel(Logger logger)
  4. ic static void i(String fmt, Object... args)
  5. info(Class clz, String logStr)
  6. info(final Logger logger, final String message)
  7. info(Logger log, Object... objectsToString)
  8. info(Logger logger, String message, Object... objects)
  9. info(Logger logger, String msg)