This article is a mirror article of machine translation, please click here to jump to the original article.

View: 36019|Reply: 2

[Source] Spring Hibernate looks at the SQL statements that are generated and executed

[Copy link]
Posted on 7/24/2019 10:47:32 AM | | |
In the file applicationConfig.xml that defines the database and database properties, set hibernate.show_sql to true


The resulting SQL will appear in the console

Note: Doing so will increase the burden on the system and is not conducive to performance tuning

ButThe parameters will become? The question mark is displayedThe solution is as follows:

The log level is TARCE<DEBUG < INFO< WARN < ERROR < FATAL, and the level is provided gradually, if the log level is set to INFO, it means that neither the TRACE nor DEBUG level logs will be visible.

The relationship between levels is the inclusion relationship, which means that if you set the log level to trace, logs greater than or equal to this level will be output.

Set upLogBack has a log level of TRACE(Spring Boot uses the LogBack log system by default, if you don't need to change to other log systems such as Log4j2, etc., you don't need to configure it, LogBack prints logs to the console by default.) )


Here is the root level used, i.e. all the logs of the project, because there are too many logs, we don't need some log output, you can set it separately as follows:


(End)





Previous:Cracking.CHM from scratch with OllyDbg
Next:Deploy ASP.NET Core to IIS server
 Landlord| Posted on 7/1/2021 4:53:53 PM |
Mybatis or MyBatis-Plus prints SQL logs
https://www.itsvse.com/thread-9975-1-1.html
 Landlord| Posted on 7/1/2021 4:54:24 PM |
yml configuration



Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com