logging update
This commit is contained in:
parent
3739e6966f
commit
4364d31a59
@ -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:
|
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.
|
1. Replace pyproject.toml "djeff" with your project name.
|
||||||
2. Add a LICENSE
|
2. **Recommended:** run `uv run pre-commit install`
|
||||||
3. run `uv run pre-commit install`
|
3. Read through the various sections below to familiarize yourself with the setup.
|
||||||
4. 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.
|
A few of the libraries may require additional setup, documented under the **You:** steps below.
|
||||||
|
|
||||||
## File System Layout
|
## File System Layout
|
||||||
|
@ -142,7 +142,7 @@ DJANGO_STRUCTLOG_USER_ID_FIELD = None
|
|||||||
|
|
||||||
LOGGING = {
|
LOGGING = {
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"disable_existing_loggers": False,
|
"disable_existing_loggers": True,
|
||||||
"formatters": {
|
"formatters": {
|
||||||
"json_formatter": {
|
"json_formatter": {
|
||||||
"()": structlog.stdlib.ProcessorFormatter,
|
"()": structlog.stdlib.ProcessorFormatter,
|
||||||
@ -180,10 +180,13 @@ LOGGING = {
|
|||||||
"handlers": ["console", "flat_line_file", "json_file"],
|
"handlers": ["console", "flat_line_file", "json_file"],
|
||||||
"level": "INFO",
|
"level": "INFO",
|
||||||
},
|
},
|
||||||
"djeff": {
|
# Modify this to match the name of your application.
|
||||||
"handlers": ["console", "flat_line_file", "json_file"],
|
# to configure different logging for your app vs. Django's
|
||||||
"level": "INFO",
|
# internals.
|
||||||
},
|
# "YOUR_APP": {
|
||||||
|
# "handlers": ["console", "flat_line_file", "json_file"],
|
||||||
|
# "level": "INFO",
|
||||||
|
# },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user