Skip to content

Commit d91fec5

Browse files
authored
Merge pull request #524 from NHSDigital/dependabot/pip/python-json-logger-4.0.0
Dependabot/pip/python json logger 4.0.0
2 parents f04a09b + 4bd67a8 commit d91fec5

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

poetry.lock

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ asgiref = "^3.11.0"
2929
eval-type-backport = "^0.2.2"
3030
mangum = "^0.19.0"
3131
wireup = "^2.1.0"
32-
python-json-logger = "^3.3.0"
32+
python-json-logger = "^4.0.0"
3333
python-dateutil = "^2.9.0"
3434
pyhamcrest = "^2.1.0"
3535
boto3 = "^1.40.57"

src/eligibility_signposting_api/logging/logs_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def wrapper(event: LambdaEvent, context: LambdaContext) -> dict[str, Any] | None
3030

3131

3232
class EnrichedJsonFormatter(JsonFormatter):
33-
def add_fields(self, log_record: dict[str, Any], record: logging.LogRecord, message_dict: dict[str, Any]) -> None:
34-
log_record["request_id"] = request_id_context_var.get() or "-"
35-
super().add_fields(log_record, record, message_dict)
33+
def add_fields(self, log_data: dict[str, Any], record: logging.LogRecord, message_dict: dict[str, Any]) -> None:
34+
log_data["request_id"] = request_id_context_var.get() or "-"
35+
super().add_fields(log_data, record, message_dict)
3636

3737

3838
def init_logging(quieten: Sequence[str] = ("asyncio", "botocore", "boto3", "mangum", "urllib3")) -> None:

0 commit comments

Comments
 (0)