Disable `ensure_ascii` on `json.dumps`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- observability
Research direction
Start by searching the project for json.dumps and the formatter used by ecs_logging.StdlibFormatter. Run the supplied Python reproduction to confirm the current escaped output, then verify that non-English characters appear directly in both message fields while the result remains valid JSON.
Written by the indexing model from the issue text.
Description
Current output is unreadable in console if any language other than English is used in the messages.
Reproduction code:
import logging
import ecs_logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
handler.setFormatter(ecs_logging.StdlibFormatter())
logger.addHandler(handler)
logger.info("안녕하세요")
Expected output:
{
"@timestamp": "2025-06-20T06:39:24.589Z",
"log.level": "info",
"message": "안녕하세요",
"ecs.version": "1.6.0",
"log": {
"logger": "root",
"origin": {
"file": { "line": 10, "name": "<python-input-2>" },
"function": "<module>"
},
"original": "안녕하세요"
},
"process": {
"name": "MainProcess",
"pid": 302584,
"thread": { "id": 140083028806592, "name": "MainThread" }
}
}
Received output:
{
"@timestamp": "2025-06-20T06:39:24.589Z",
"log.level": "info",
"message": "\uc548\ub155\ud558\uc138\uc694",
"ecs.version": "1.6.0",
"log": {
"logger": "root",
"origin": {
"file": { "line": 10, "name": "<python-input-2>" },
"function": "<module>"
},
"original": "\uc548\ub155\ud558\uc138\uc694"
},
"process": {
"name": "MainProcess",
"pid": 302584,
"thread": { "id": 140083028806592, "name": "MainThread" }
}
}
- Dominant language
- Python
- Stars
- 74
- Forks
- 33
- Avg merge
- 9h 3m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elastic/ecs-logging-python
-
agent-python community triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
elastic/ecs-logging-python#185 · 6 comments ·
-
agent-python community triage
Difficulty 1/5 Under an hour Newbie friendliness 35/100
elastic/ecs-logging-python#146 · 2 comments ·
-
agent-python community enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
elastic/ecs-logging-python#73 · 5 comments ·
-
agent-python community triage
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
elastic/ecs-logging-python#72 · 1 reaction ·
-
agent-python
Difficulty 5/5 Over a week Newbie friendliness 25/100
elastic/ecs-logging-python#58 · 3 comments · 1 reaction ·
All issues in elastic/ecs-logging-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100