logging update

This commit is contained in:
jpt 2025-04-19 19:06:39 -05:00
parent 3739e6966f
commit 4364d31a59
2 changed files with 11 additions and 9 deletions

View File

@ -17,10 +17,9 @@ Please note that the underlying libraries are under their own (MIT/BSD) licenses
If you are using this library as a baseline, there are a few steps you'll need to follow:
1. Replace all instances of "djeff" with your project name.
2. Add a LICENSE
3. run `uv run pre-commit install`
4. Read through the various sections below to familiarize yourself with the setup.
1. Replace pyproject.toml "djeff" with your project name.
2. **Recommended:** run `uv run pre-commit install`
3. Read through the various sections below to familiarize yourself with the setup.
A few of the libraries may require additional setup, documented under the **You:** steps below.
## File System Layout

View File

@ -142,7 +142,7 @@ DJANGO_STRUCTLOG_USER_ID_FIELD = None
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"disable_existing_loggers": True,
"formatters": {
"json_formatter": {
"()": structlog.stdlib.ProcessorFormatter,
@ -180,10 +180,13 @@ LOGGING = {
"handlers": ["console", "flat_line_file", "json_file"],
"level": "INFO",
},
"djeff": {
"handlers": ["console", "flat_line_file", "json_file"],
"level": "INFO",
},
# Modify this to match the name of your application.
# to configure different logging for your app vs. Django's
# internals.
# "YOUR_APP": {
# "handlers": ["console", "flat_line_file", "json_file"],
# "level": "INFO",
# },
},
}