美文网首页
Spring Boot 配置log

Spring Boot 配置log

作者: SweetMain | 来源:发表于2017-04-18 21:58 被阅读47次
1. application.properties
logging.level.xxx.xxx.包=DEBUG
2. 代码中使用
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
...
public HelloController {
  private static final Logger LOGGER = LoggerFactory.getLogger(HelloController.class);
  ...
  LOGGER.debug("xxxxx debug");
  LOGGER.error("xxxxx error");
}

相关文章

网友评论

      本文标题:Spring Boot 配置log

      本文链接:https://www.haomeiwen.com/subject/pciqzttx.html