Java slf4j Logger warn(String msg)

Here you can find the source of warn(String msg)

Description

warn

License

Open Source License

Declaration

public static void warn(String msg) 

Method Source Code


//package com.java2s;
import org.slf4j.Logger;

public class Main {
    private static Logger logger = null;

    public static void warn(String msg) {
        StackTraceElement se = Thread.currentThread().getStackTrace()[2];
        String clazzMethod = " " + se.getClassName() + "." + se.getMethodName() + "(" + se.getFileName() + ":"
                + se.getLineNumber() + ") ";

        String log = clazzMethod + "   " + " MSG: " + msg;
        logger.warn(log);/* w w w  . jav a  2s .c  o m*/
    }
}

Related

  1. traceCall(Class objectClass)
  2. traceLog(final Logger log, final String logMethodName, String logMsg)
  3. warn(Logger log, Object... args)
  4. warn(String format, Object... arguments)
  5. warn(String message)
  6. warn(String msg)
  7. warnOrDebug(Logger logger, String msg)
  8. wrapWithMDC(Runnable r)
  9. writeErrorLog(String cont)