1
Fork 0

Add logging config

This commit is contained in:
Jake Howard 2024-01-02 23:13:55 +00:00
parent 58fda689bf
commit 8cc32be33f
Signed by: jake
GPG Key ID: 57AFB45680EDD477
1 changed files with 34 additions and 0 deletions

View File

@ -126,3 +126,37 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DATABASE_ROUTERS = [
"yamdl.router.YamdlRouter",
]
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"console": {
"class": "logging.StreamHandler",
"formatter": "verbose"
},
},
"formatters": {
"verbose": {
# Mostly copied from gunicorn
"format": "%(asctime)s [%(process)d] [%(name)s] [%(levelname)s] %(message)s",
"datefmt": "[%Y-%m-%d %H:%M:%S %z]",
}
},
"root": {
"handlers": ["console"],
"level": "WARNING",
},
"loggers": {
"django": {
"handlers": ["console"],
"level": "INFO",
"propagate": False,
},
"yamdl": {
"handlers": ["console"],
"level": "INFO",
"propagate": False,
},
},
}