1. As introduced earlier, the default log framework used by Spring Boot is Apache Commons Logging. In Spring x (i.e. Spring Boot x), we need to import dependencies manually.
2. The default integrated log system of SpringBoot is LogBaCk, logBack is introduced with spring-boot-starter-logging, as shown in the figure: Of course, SpringBoot also supports Log4j2. You just need to remove the dependence of logback and introduce Log4j2.
3. Specify the configuration. Place each log frame's own configuration file to the class path, and SpringBoot will not use the default configuration.
4. There are also two very important strategies in the SpringBoot framework: out-of-the-box and agreement is better than configuration. Out-of-the-box, Outofbox, refers to the development process, by adding relevant dependency packages to the pom file of the MAVEN project, and then using corresponding annotations to replace the tedious XML configuration file to manage the life cycle of the object.
asynchronous thread writes to the log, so that It will neither affect the business code nor the system performance. For example, if you add the logging method directly in the main thread, if the writing is relatively slow, it will even cause the user to delay the use of normal functions and cause a page request timeout.
For example, if the INFO level is defined here, all DEBUG-level log information in the application will not be printed out. appenderName: It is to specify where the log information is output. You can specify multiple output destinations at the same time.
Define the configuration file. First of all, using the configuration file will make our application more flexible to configure the log log output method, including output priority, output destination and output format. Log4j supports two configuration file formats, one is an XML format file, and the other is a Java feature file log4j.properties (key = value).
To record the operation log and view it, you definitely need to save the operation record - just save it directly to the database.For the log management module, because there is a log record above, it should be easy to do the function of deleting and checking. I won't go into details about this piece. The most important thing: how to record the log.
Java log framework This set of courses is for friends with Java foundation, from shallow to deep to explain each Knowledge points and programming ideas, the system is complete to help friends establish a complete Java log system knowledge system and high-performance log framework selection.
The core advantages of MongoDB are flexible document models, high-availability replication sets and scalable fragment clusters. Tiantongyuan jaVa training suggests that you can try to understand MongoDB in a variety of ways, such as real-time monitoring of MongoDB tools, memory usage and page errors, connection, database operation, replication set, etc.
At the legal level, logs are also important electronic evidence. Advanced logging, monitoring and auditing means can help customers effectively reduce the problems of information destruction and information leakage, and play a certain deterrent role on illegal acts. If you want to know more information about java development, it is recommended to consult Qianfeng Education.
Global trade compliance dashboards-APP, download it now, new users will receive a novice gift pack.
1. As introduced earlier, the default log framework used by Spring Boot is Apache Commons Logging. In Spring x (i.e. Spring Boot x), we need to import dependencies manually.
2. The default integrated log system of SpringBoot is LogBaCk, logBack is introduced with spring-boot-starter-logging, as shown in the figure: Of course, SpringBoot also supports Log4j2. You just need to remove the dependence of logback and introduce Log4j2.
3. Specify the configuration. Place each log frame's own configuration file to the class path, and SpringBoot will not use the default configuration.
4. There are also two very important strategies in the SpringBoot framework: out-of-the-box and agreement is better than configuration. Out-of-the-box, Outofbox, refers to the development process, by adding relevant dependency packages to the pom file of the MAVEN project, and then using corresponding annotations to replace the tedious XML configuration file to manage the life cycle of the object.
asynchronous thread writes to the log, so that It will neither affect the business code nor the system performance. For example, if you add the logging method directly in the main thread, if the writing is relatively slow, it will even cause the user to delay the use of normal functions and cause a page request timeout.
For example, if the INFO level is defined here, all DEBUG-level log information in the application will not be printed out. appenderName: It is to specify where the log information is output. You can specify multiple output destinations at the same time.
Define the configuration file. First of all, using the configuration file will make our application more flexible to configure the log log output method, including output priority, output destination and output format. Log4j supports two configuration file formats, one is an XML format file, and the other is a Java feature file log4j.properties (key = value).
To record the operation log and view it, you definitely need to save the operation record - just save it directly to the database.For the log management module, because there is a log record above, it should be easy to do the function of deleting and checking. I won't go into details about this piece. The most important thing: how to record the log.
Java log framework This set of courses is for friends with Java foundation, from shallow to deep to explain each Knowledge points and programming ideas, the system is complete to help friends establish a complete Java log system knowledge system and high-performance log framework selection.
The core advantages of MongoDB are flexible document models, high-availability replication sets and scalable fragment clusters. Tiantongyuan jaVa training suggests that you can try to understand MongoDB in a variety of ways, such as real-time monitoring of MongoDB tools, memory usage and page errors, connection, database operation, replication set, etc.
At the legal level, logs are also important electronic evidence. Advanced logging, monitoring and auditing means can help customers effectively reduce the problems of information destruction and information leakage, and play a certain deterrent role on illegal acts. If you want to know more information about java development, it is recommended to consult Qianfeng Education.
WTO harmonization and HS codes
author: 2024-12-24 01:14How to leverage trade data in negotiations
author: 2024-12-24 01:09Trade data-based price benchmarks
author: 2024-12-24 01:08How to ensure data-driven export strategies
author: 2024-12-24 00:56HS code-based compliance in Asia-Pacific
author: 2024-12-23 23:23Japan customs transaction analysis
author: 2024-12-24 01:34Global tender participation by HS code
author: 2024-12-24 01:20How to interpret trade statistics
author: 2024-12-24 00:44China HS code interpretation guide
author: 2024-12-24 00:41HS code trends in textiles and apparel
author: 2024-12-23 23:56411.92MB
Check486.94MB
Check796.65MB
Check389.24MB
Check577.48MB
Check831.79MB
Check856.93MB
Check666.28MB
Check369.96MB
Check291.24MB
Check367.77MB
Check854.57MB
Check131.17MB
Check854.28MB
Check115.75MB
Check399.47MB
Check298.39MB
Check439.46MB
Check199.75MB
Check785.17MB
Check121.43MB
Check224.12MB
Check339.97MB
Check287.45MB
Check361.68MB
Check324.31MB
Check724.95MB
Check977.25MB
Check444.63MB
Check761.67MB
Check191.81MB
Check239.96MB
Check563.58MB
Check621.11MB
Check256.19MB
Check651.73MB
CheckScan to install
Global trade compliance dashboards to discover more
Netizen comments More
2619 European Union HS code verification
2024-12-24 01:02 recommend
2997 Actionable global trade insights
2024-12-24 00:40 recommend
2244 Detailed trade data mapping tools
2024-12-24 00:13 recommend
703 HS code-driven procurement strategies
2024-12-23 23:50 recommend
771 International trade database customization
2024-12-23 23:00 recommend