Here you can find the source of info(final Logger logger, final String message)
Parameter | Description |
---|---|
logger | logger instance, can't be <code>null</code> |
message | logging message |
public static void info(final Logger logger, final String message)
//package com.java2s; //License from project: Open Source License import org.slf4j.Logger; import org.slf4j.Marker; public class Main { /**/*from w ww . j a v a2 s.c om*/ * Log info message.<br> * Is info enabled check will be performed. * * @param logger * logger instance, can't be <code>null</code> * @param message * logging message */ public static void info(final Logger logger, final String message) { if (logger.isInfoEnabled()) logger.info(message); } /** * Log info message.<br> * Is info enabled check will be performed. * * @param logger * logger instance, can't be <code>null</code> * @param format * logging message format, used <code>String.format</code> * @param args * logging message format arguments */ public static void info(final Logger logger, final String format, final Object... args) { if (logger.isInfoEnabled()) logger.info(String.format(format, args)); } /** * Log info message.<br> * Is info enabled check will be performed. * * @param logger * logger instance, can't be <code>null</code> * @param marker * logging marker * @param message * logging message */ public static void info(final Logger logger, final Marker marker, final String message) { if (logger.isInfoEnabled()) logger.info(marker, message); } /** * Log info message.<br> * Is info enabled check will be performed. * * @param logger * logger instance, can't be <code>null</code> * @param marker * logging marker * @param format * logging message format, used <code>String.format</code> * @param args * logging message format arguments */ public static void info(final Logger logger, final Marker marker, final String format, final Object... args) { if (logger.isInfoEnabled()) logger.info(marker, String.format(format, args)); } /** * Log info message.<br> * Is info enabled check will be performed. * * @param logger * logger instance, can't be <code>null</code> * @param message * logging message * @param cause * logging cause */ public static void info(final Logger logger, final String message, final Throwable cause) { if (logger.isInfoEnabled()) logger.info(message, cause); } /** * Log info message.<br> * Is info enabled check will be performed. * * @param logger * logger instance, can't be <code>null</code> * @param cause * logging cause * @param format * logging message format, used <code>String.format</code> * @param args * logging message format arguments */ public static void info(final Logger logger, final Throwable cause, final String format, final Object... args) { if (logger.isInfoEnabled()) logger.info(String.format(format, args), cause); } /** * Log info message.<br> * Is info enabled check will be performed. * * @param logger * logger instance, can't be <code>null</code> * @param marker * logging marker * @param message * logging message * @param cause * logging cause */ public static void info(final Logger logger, final Marker marker, final String message, final Throwable cause) { if (logger.isInfoEnabled()) logger.info(marker, message, cause); } /** * Log info message.<br> * Is info enabled check will be performed. * * @param logger * logger instance, can't be <code>null</code> * @param marker * logging marker * @param cause * logging cause * @param format * logging message format, used <code>String.format</code> * @param args * logging message format arguments */ public static void info(final Logger logger, final Marker marker, final Throwable cause, final String format, final Object... args) { if (logger.isInfoEnabled()) logger.info(marker, String.format(format, args), cause); } }