Skip to content

Commit

Permalink
switch from simple formatter to json formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Feb 25, 2025
1 parent b634852 commit 07e2e97
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
8 changes: 3 additions & 5 deletions config/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

from dotenv import load_dotenv
from json_log_formatter import JSONFormatter
from machina import MACHINA_MAIN_STATIC_DIR, MACHINA_MAIN_TEMPLATE_DIR


Expand Down Expand Up @@ -311,13 +312,10 @@
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"simple": {
"format": "{levelname} {asctime} {pathname} : {message}",
"style": "{",
},
"json": {"()": JSONFormatter},
},
"handlers": {
"console": {"class": "logging.StreamHandler", "formatter": "simple"},
"console": {"class": "logging.StreamHandler", "formatter": "json"},
"null": {"class": "logging.NullHandler"},
},
"loggers": {
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies = [
"django-permissions-policy>=4.24",
"langdetect>=1.0.9",
"pyjwt>=2.10",
"json-log-formatter>=1.1",
]

[dependency-groups]
Expand Down
12 changes: 10 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 07e2e97

Please sign in to comment.