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

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,
},
},
}