import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger logger = LoggerFactory.getLogger(Abc.class);
(条件)
if (logger.isDebugEnabled()) {
logger.debug("Processing trade with id: " + id + " and symbol: " + symbol);
} (占位符)
logger.debug("Processing trade with id: {} and symbol : {} ", id, symbol);
<logger name="com.taobao.dubbo.config" additivity="false">logger.error(各类参数或者对象toString + "_" + e.getMessage(), e);