elastic / elastic/ecs-logging-python

Disable `ensure_ascii` on `json.dumps`

オープン
#170 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
agent-python community triage
主要言語
Python
スター
74
フォーク
33
平均マージ
9時間 3分
マージ済み PR(30日)
1

説明

Current output is unreadable in console if any language other than English is used in the messages.

Reproduction code:
```python
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:
```json
{
"@timestamp": "2025-06-20T06:39:24.589Z",
"log.level": "info",
"message": "안녕하세요",
"ecs.version": "1.6.0",
"log": {
"logger": "root",
"origin": {
"file": { "line": 10, "name": "" },
"function": ""
},
"original": "안녕하세요"
},
"process": {
"name": "MainProcess",
"pid": 302584,
"thread": { "id": 140083028806592, "name": "MainThread" }
}
}
```

Received output:
```json
{
"@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": "" },
"function": ""
},
"original": "\uc548\ub155\ud558\uc138\uc694"
},
"process": {
"name": "MainProcess",
"pid": 302584,
"thread": { "id": 140083028806592, "name": "MainThread" }
}
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。