|
@@ -165,7 +165,6 @@ LOGGING = {
|
|
|
'disable_existing_loggers': True,
|
|
|
'formatters': {
|
|
|
'error_format': {
|
|
|
- # 'format': '{"asctime":"%(asctime)s","thread":"%(threadName)s:%(thread)d","errorline":"%(lineno)d","errorlevel":"%(levelname)s","errorcontent":"%(message)s"}'
|
|
|
'format': '%(asctime)s %(threadName)s %(thread)d %(lineno)d %(levelname)s %(message)s'
|
|
|
},
|
|
|
'standard': {
|
|
@@ -195,10 +194,10 @@ LOGGING = {
|
|
|
},
|
|
|
'info': {
|
|
|
'level': 'INFO',
|
|
|
- 'class': 'logging.handlers.RotatingFileHandler',
|
|
|
+ 'class': 'logging.handlers.TimedRotatingFileHandler',
|
|
|
'filename': BASE_DIR + '/static/log/info/info.log',
|
|
|
- 'maxBytes': 1024 * 1024 * 300, # 300M
|
|
|
- 'backupCount': 30,
|
|
|
+ 'backupCount': 10,
|
|
|
+ 'maxBytes': 1024 * 1024 * 2 * 1024, # 2G
|
|
|
'formatter': 'standard',
|
|
|
'encoding': 'utf-8',
|
|
|
},
|
|
@@ -206,8 +205,8 @@ LOGGING = {
|
|
|
'level': 'INFO',
|
|
|
'class': 'logging.handlers.TimedRotatingFileHandler',
|
|
|
'filename': BASE_DIR + '/static/log/time/info.log',
|
|
|
- 'backupCount': 30,
|
|
|
- 'when': 'D',
|
|
|
+ 'backupCount': 10,
|
|
|
+ 'maxBytes': 1024 * 1024 * 2 * 1024, # 2G
|
|
|
'formatter': 'standard',
|
|
|
'encoding': 'utf-8',
|
|
|
},
|
|
@@ -215,7 +214,6 @@ LOGGING = {
|
|
|
'loggers': {
|
|
|
'django': {
|
|
|
'handlers': ['default', 'console'],
|
|
|
- # 'handlers': ['mail_admins','default','console'],
|
|
|
'level': 'ERROR',
|
|
|
'propagate': False
|
|
|
},
|