Here you can find the source of traceLog(final Logger log, final String logMethodName, String logMsg)
Parameter | Description |
---|---|
log | TODO |
logMethodName | TODO |
logMsg | TODO |
public static void traceLog(final Logger log, final String logMethodName, String logMsg)
//package com.java2s; /*// w w w . j a v a2s.co m * Copyright ? 2016 Liaison Technologies, Inc. * * 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 { /** * TODO * @param log TODO * @param logMethodName TODO * @param logMsg TODO * @param exc TODO */ public static void traceLog(final Logger log, final String logMethodName, String logMsg, final Throwable exc) { // >>>>> LOG >>>>> if (log.isTraceEnabled()) { logMsg = "[" + logMethodName + "] " + logMsg; if (exc != null) { log.trace(logMsg, exc); } else { log.trace(logMsg); } } else if (log.isDebugEnabled()) { if (exc != null) { log.debug(logMsg, exc); } else { log.debug(logMsg); } } // <<<<< log <<<<< } /** * TODO * @param log TODO * @param logMethodName TODO * @param logMsg TODO */ public static void traceLog(final Logger log, final String logMethodName, String logMsg) { traceLog(log, logMethodName, logMsg, null); } }