Here you can find the source of logResult(long time, String traceId, String apiName, String params, String jsonObject)
Parameter | Description |
---|---|
traceId | a parameter |
apiName | a parameter |
params | a parameter |
public static void logResult(long time, String traceId, String apiName, String params, String jsonObject)
//package com.java2s; //License from project: Apache License import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Main { private static final String LOG_TRACE_MSG_WITH_PARAMS_DEBUG = "time={},id={},service={},params={},result={}"; private static final String LOG_TRACE_MSG_WITH_PARAMS_INFO = "time={},id={},service={}"; private static Logger REUEST_LOGGER = LoggerFactory .getLogger("venus.tracer"); /**/*from www. j a v a 2 s .c o m*/ * * @param traceId * @param apiName * @param params */ public static void logResult(long time, String traceId, String apiName, String params, String jsonObject) { if (REUEST_LOGGER.isDebugEnabled()) { REUEST_LOGGER.debug(LOG_TRACE_MSG_WITH_PARAMS_DEBUG, new Object[] { time, traceId, apiName, params, jsonObject }); } else if (REUEST_LOGGER.isInfoEnabled()) { REUEST_LOGGER.info(LOG_TRACE_MSG_WITH_PARAMS_INFO, new Object[] { time, traceId, apiName }); } } }