elastic / elastic/ecs-logging-python

Directly adding fields to json log when log has parameterized string

Open
#44 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
74
Forks
33
Avg merge
9h 3m
Merged PRs (30d)
1

Description

is something like this possible
example:
```
addItem='abcd'
logger.info(f"added todo item {addItem} to the todo list")
```
*note: or any way of adding parametrized string
log:
`{'name': 'app.routes.controller', 'msg': 'added todo item abcd to the todo list', 'args': (), 'levelname': 'INFO', 'levelno': 20, 'fields': {'addItem': 'abcd'}}`

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is identified in the issue. Start by locating the logger API and its handling of parameterized messages and structured fields; done means the requested fields can be emitted alongside the formatted message, with tests covering the example behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.