The promotional items Log Print

       Project references org.slf4j print logs, configuration files logback-spring.xml set to print the log path. Log file type into error.log, warn.log, info.log, debug.log, various types of files automatically aggregated output full-10M will generate large files with date, automatically generated summary with large date daily file.

error.log: error log to print a variety of needs or unknown log output need to focus on the analysis,

Class print mode: LOGGER.error ( "### doMPMonitorFollows error: uid = {}, message = {}", uid, e);

warn.log: Print is alert log entries that appear, has no effect on the current project, not yet considered;

info.log: print is all the basic information you need to provide analysis output basis, during the testing phase of the production line environment I always like to print the main server configuration parameters dynamically allocated time-consuming and complex operations in the sub-server,

Class print mode: LOGGER.info ( "... {}", System.currentTimeMillis () - startTime);

debug.log: SQL statement is printed, well log analysis provides a SQL statement

        Local test environment error.log, warn.log, info.log, debug.log will open, in order to avoid printing a large number of simultaneous log analysis focused on post-deployment operations log production only need to open the error.log (focuses on abnormal log Print), info.log (control a large number of log output). Note that you must log ban debug.log print background large number of SQL statements logs can easily lead to inadequate server disk.

       Works on dial-up server as xx-robot-task based on business needs to avoid the risk of the prohibition of certain sensitive print the log, but the automatic timeout print sensitive log in asynchronous call interface will be introduced org.apache.http, I only need to configure the control file is not printed, is introduced in logback-spring.xml <logger name = "org.apache.http.impl.execchain.RetryExec" level = "OFF" /> to.

       Log files and back-end server deployment 9 sub-projects printed are put together, can conveniently delete or Preview logs, and restart a service, log folder production as follows:

 

 

 

Guess you like

Origin www.cnblogs.com/xx0829/p/11653247.html