Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging Handler支持特定格式识别: JSON #76

Closed
wjo1212 opened this issue May 23, 2018 · 1 comment
Closed

Logging Handler支持特定格式识别: JSON #76

wjo1212 opened this issue May 23, 2018 · 1 comment

Comments

@wjo1212
Copy link
Collaborator

wjo1212 commented May 23, 2018

  1. 自动识别特定格式, 例如dict为JSON, KV等等
data = {'a':1, 'b': 2}
logger.error(data)

可以构建字段为a, b的域
问题1: 与现有冲突时, 处理策略是什么?
问题2: 将message索引构建为JSON的区别(更加灵活, 因为打log时, 格式是混合的)

其他情况:
2. KV格式, 例如字符串的, 自动提取Key

data = 'name=xiaoming home="nanjing"  score=12.5'
logger.info(data)

自动构建name, home, score字段, 能够识别双引号等

@wjo1212
Copy link
Collaborator Author

wjo1212 commented May 25, 2018

fixed in 0.6.30

@wjo1212 wjo1212 closed this as completed May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant