简体   繁体   中英

How to logging unicode dictionary from elasticsearch-py?

By default, elasticsearch-py logs output dictionary as json dumped like:

{'key': '2016\u5e747\u670829\u65e5'}

While I'd like to see the result as following:

{'key': '2016年7月29日'}

How can I do that?

EDIT

Python 2.7.10

$ pip freeze | grep elasticsearch
elasticsearch==1.9.0

elasticsearch-py package has improved the unicode logging output.

https://github.com/elastic/elasticsearch-py/commit/c305dc5587963bc9e41ae8cf35bb6eff5afb199e

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM