Java slf4j Logger logInfo(Logger log, Throwable t)

Here you can find the source of logInfo(Logger log, Throwable t)

Description

log Info

License

Apache License

Declaration

public static void logInfo(Logger log, Throwable t) 

Method Source Code

//package com.java2s;
/**/*  ww  w.  j  av  a2 s .  c o  m*/
 * Copyright (c) Istituto Nazionale di Fisica Nucleare (INFN). 2006-2016
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import org.slf4j.Logger;

public class Main {
    public static void logInfo(Logger log, Throwable t) {

        log.info(t.getMessage());
        if (log.isDebugEnabled())
            log.info(t.getMessage(), t);
    }
}

Related

  1. LogException(Logger log, String descrption, Throwable e)
  2. logExit(Logger logger, String methodName, String returnValue, long timeSpent)
  3. loggerForThisClass()
  4. loggerWithName(Class klass, String name)
  5. logInfo(Logger log)
  6. logInfo(Logger logger, String s)
  7. logJavaProperties(Logger log)
  8. logLine(final Logger logger, final Level level, final String msg, final boolean withStackTrace, final String logMessagePrefix)
  9. logResult(long time, String traceId, String apiName, String params, String jsonObject)