Java slf4j Logger logThrowable(Throwable throwable)

Here you can find the source of logThrowable(Throwable throwable)

Description

log Throwable

License

LGPL

Declaration

public static void logThrowable(Throwable throwable) 

Method Source Code


//package com.java2s;
/*This file is part of the project "Reisisoft Adaptive Testing",
 * which is licenced under LGPL v3+. You may find a copy in the source,
 * or obtain one at http://www.gnu.org/licenses/lgpl-3.0-standalone.html */

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

public class Main {
    private static Logger logger = LoggerFactory.getLogger("AdaptiveTesting");

    public static void logThrowable(Throwable throwable) {
        logger.error("An exception occured:" + throwable.getMessage(), throwable);
    }/*from  ww w. j  av a2s . c o  m*/
}

Related

  1. logInfo(Logger logger, String s)
  2. logJavaProperties(Logger log)
  3. logLine(final Logger logger, final Level level, final String msg, final boolean withStackTrace, final String logMessagePrefix)
  4. logResult(long time, String traceId, String apiName, String params, String jsonObject)
  5. logThreadGroup(final Logger log, ThreadGroup group, int level)
  6. logWarningWithDebugDetails(Logger logger, Throwable t, String message, Object... values)
  7. notNull(String message, Object obj)
  8. parsePortNumber(String port, int defaultPort)
  9. printInfoLog(Class cla, String message)