Browse Source

Ship with a better log.conf.

Added error.log to capture all errors.
bc Wong 15 năm trước cách đây
mục cha
commit
cfa647ccf0
1 tập tin đã thay đổi với 11 bổ sung4 xóa
  1. 11 4
      desktop/conf.dist/log.conf

+ 11 - 4
desktop/conf.dist/log.conf

@@ -16,21 +16,28 @@ args=('%LOG_DIR%/%PROC_NAME%.log', 'a', 5000000, 5)
 ##########################################
 
 [logger_root]
-handlers=logfile
+handlers=logfile,errorlog
 
 [logger_access]
-handlers=access
+handlers=accesslog
 qualname=access
 
 # The logrotation limit is set at 5MB per file for a total of 5 copies.
 # I.e. 25MB for each set of logs.
-[handler_access]
+[handler_accesslog]
 class=handlers.RotatingFileHandler
 level=DEBUG
 propagate=True
 formatter=access
 args=('%LOG_DIR%/access.log', 'a', 5000000, 5)
 
+# All errors go into error.log
+[handler_errorlog]
+class=handlers.RotatingFileHandler
+level=ERROR
+formatter=default
+args=('%LOG_DIR%/error.log', 'a', 5000000, 5)
+
 [formatter_default]
 format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
 datefmt=%d/%b/%Y %H:%M:%S +0000
@@ -43,7 +50,7 @@ datefmt=%d/%b/%Y %H:%M:%S +0000
 keys=root,access
 
 [handlers]
-keys=logfile,access
+keys=logfile,accesslog,errorlog
 
 [formatters]
 keys=default,access