Spring Boot 配置log

2017-04-18  本文已影响47人  SweetMain
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");
}
上一篇下一篇

猜你喜欢

热点阅读