cmanaha / python-elasticsearch-logger

Python Elasticsearch handler for the standard python logging framework
Other
232 stars 116 forks source link

Fix issue with dictionary logging #47

Closed kusha closed 6 years ago

kusha commented 6 years ago

Elasticsearch failed at 'arg' field parsing if log function argument is a dictionary. Example: logging.info("POST query: %s", {'any': 'dictionary'}) This fix enforces conversion of log arguments to strings.

codecov-io commented 6 years ago

Codecov Report

Merging #47 into master will increase coverage by 0.22%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #47      +/-   ##
=======================================
+ Coverage   82.78%   83%   +0.22%     
=======================================
  Files           2     2              
  Lines         151   153       +2     
  Branches       18    20       +2     
=======================================
+ Hits          125   127       +2     
  Misses         22    22              
  Partials        4     4
Impacted Files Coverage Δ
cmreslogging/handlers.py 82.19% <100%> (+0.24%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6765a24...4317f7a. Read the comment docs.