当前位置:网站首页>SQL log
SQL log
2022-07-29 05:12:00 【Hang on a tree】
One 、 Add log jar
<!--log4f-->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
Two 、 Add the file configuration of the log –log4j.properties
log4j.rootLogger=DEBUG, Console
#Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
log4j.logger.java.sql.ResultSet=INFO
log4j.logger.org.apache=INFO
log4j.logger.java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG
Detailed log :
# Rank as DEBUG Log information output to console and file These two destinations ,console and file Is defined in the following code
log4j.rootLogger=DEBUG,console,file
# Related settings of console output
log4j.appender.console = org.apache.log4j.ConsoleAppender
log4j.appender.console.Target = System.out
log4j.appender.console.Threshold=DEBUG
log4j.appender.console.layout = org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%c]-%m%n
# File output related settings
log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.File=D:/qy151/log/qy151.log
log4j.appender.file.MaxFileSize=10mb
log4j.appender.file.Threshold=DEBUG
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%p][%d{yy-MM-dd}][%c]%m%n
# Log output level
log4j.logger.org.mybatis=DEBUG
log4j.logger.java.sql=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.ResultSet=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG
边栏推荐
- Open source Huizhi creates the future | the openeuler sub forum of 2022 open atom global open source summit was successfully held
- JS (in ES6) sync & await understanding
- Mapper agent development
- Flink+iceberg environment construction and production problem handling
- Deadlock to be resolved
- 开源汇智创未来 | 2022开放原子全球开源峰会 openEuler 分论坛圆满召开
- 缓存穿透、缓存击穿、缓存雪崩以及解决方法
- On prepayment of house purchase
- 深度学习刷SOTA的一堆trick
- Open the tutorial of adding and modifying automatically playing music on the open zone website
猜你喜欢
MySQL定时调用预置函数完成数据更新
玩家访问网站自动弹窗加QQ群方法以及详细代码
The song of the virtual idol was originally generated in this way!
Google gtest事件机制
学习数据库的第一个程序
The method and detailed code of automatically pop-up and QQ group when players visit the website
[file download] easyexcel quick start
What if the office prompts that the system configuration cannot run?
Deep learning brush a bunch of tricks of SOTA
WPS如何进行快速截屏?WPS快速截屏的方法
随机推荐
关于thymeleaf的配置与使用
Raspberry pie 4B + Intel neural computing stick (stick2) +yolov5 feasibility study report
Huawei ilearning AI mathematics foundation course notes
Deadlock analysis using jstack, jconsole, and jvisualvm
Lenovo Savior r7000+ add ssd+ copy and partition the information of the original D disk to the new SSD
三层项目的架构分析及构造方法的参数名称注入
Unity metaverse (III), protobuf & socket realize multi person online
Operator operation list of spark
The song of the virtual idol was originally generated in this way!
The difference between the two ways of thread implementation - simple summary
WPS插入超链接无法打开,提示“无法打开指定文件”怎么办!
Word如何查看文档修改痕迹?Word查看文档修改痕迹的方法
Google GTEST event mechanism
A little knowledge about management
传奇服务端如何添加地图
stack和queue和优先级队列(大堆和小堆)模拟实现和仿函数讲解
Big silent event Google browser has no title
一文带你搞懂环绕通知@Around与最终通知@After的实现
How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally
Deadlock to be resolved