LOG4J介绍

-------------------siwuxie095

   

   

   

   

   

   

   

   

LOG4J 介绍

   

   

1、通过 LOG4J 可以看到程序运行过程中更详细的信息

   

「经常使用 log4j 查看日志」

   

   

   

2、LOG4J 下载链接:

   

https://www.apache.org/dist/logging/log4j/

   

   

   

3、使用方法

   

1)导入 log4j 的 jar 包

   

2)在 src 下创建 log4j 的配置文件 log4j.properties

   

   

   

4、设置日志级别

   

1debug

   

2info

   

3warn

   

(4)error

   

「优先级从低到高」

   

   

   

参考链接:

   

参考链接1参考链接2参考链接3

   

   

   

   

   

   

   

   

   

【made by siwuxie095】

原文地址:https://www.cnblogs.com/siwuxie095/p/7411156.html