feat: 调整日志

This commit is contained in:
Czw996 2021-12-23 01:09:59 +08:00
parent 7bf0b65a53
commit 675608e829

View file

@ -175,16 +175,23 @@ LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'INFO',
'class': 'logging.StreamHandler',
},
'file': {
'level': 'ERROR',
'class': 'logging.FileHandler',
'class': 'logging.handlers.TimedRotatingFileHandler',
'filename': BASE_DIR / 'logs/debug.log',
'when': 'D',
'interval': 1,
'backupCount': 100,
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'ERROR',
'handlers': ['console', 'file'],
'level': 'INFO',
'propagate': True,
},
},