|
@@ -221,10 +221,10 @@ LOGGING = {
|
|
},
|
|
},
|
|
'default': {
|
|
'default': {
|
|
'level': 'ERROR',
|
|
'level': 'ERROR',
|
|
- 'class': 'logging.handlers.TimedRotatingFileHandler',
|
|
|
|
|
|
+ 'class': 'logging.handlers.RotatingFileHandler',
|
|
'filename': BASE_DIR + '/static/log/error/error.log',
|
|
'filename': BASE_DIR + '/static/log/error/error.log',
|
|
- 'backupCount': 30,
|
|
|
|
- 'when': 'D',
|
|
|
|
|
|
+ 'maxBytes': 1024 * 1024 * 5, # 5 MB
|
|
|
|
+ 'backupCount': 5,
|
|
'formatter': 'error_format',
|
|
'formatter': 'error_format',
|
|
},
|
|
},
|
|
'console': {
|
|
'console': {
|
|
@@ -234,19 +234,19 @@ LOGGING = {
|
|
},
|
|
},
|
|
'info': {
|
|
'info': {
|
|
'level': 'INFO',
|
|
'level': 'INFO',
|
|
- 'class': 'logging.handlers.TimedRotatingFileHandler',
|
|
|
|
|
|
+ 'class': 'logging.handlers.RotatingFileHandler',
|
|
'filename': BASE_DIR + '/static/log/info/info.log',
|
|
'filename': BASE_DIR + '/static/log/info/info.log',
|
|
- 'backupCount': 30,
|
|
|
|
- 'when': 'D',
|
|
|
|
|
|
+ 'backupCount': 10,
|
|
|
|
+ 'maxBytes': 1024 * 1024 * 2 * 1024, # 2G
|
|
'formatter': 'standard',
|
|
'formatter': 'standard',
|
|
'encoding': 'utf-8',
|
|
'encoding': 'utf-8',
|
|
},
|
|
},
|
|
'error_code': {
|
|
'error_code': {
|
|
'level': 'INFO',
|
|
'level': 'INFO',
|
|
- 'class': 'logging.handlers.TimedRotatingFileHandler',
|
|
|
|
|
|
+ 'class': 'logging.handlers.RotatingFileHandler',
|
|
'filename': BASE_DIR + '/static/log/error_code/error_code.log',
|
|
'filename': BASE_DIR + '/static/log/error_code/error_code.log',
|
|
- 'backupCount': 30,
|
|
|
|
- 'when': 'D',
|
|
|
|
|
|
+ 'backupCount': 10,
|
|
|
|
+ 'maxBytes': 1024 * 1024 * 2 * 1024, # 2G
|
|
'formatter': 'standard',
|
|
'formatter': 'standard',
|
|
'encoding': 'utf-8',
|
|
'encoding': 'utf-8',
|
|
},
|
|
},
|