Open edefaria opened 9 years ago
Code looks OK to me. Can you add test coverage for this change?
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.
I found 2 issues:
1/An array of level can have an integer value, currently the code convert to string the level if it just have one value without an array, but when event['level'] is an array, in some rare case, it may crash like that (if integer value is present in the array) It crashs with the following stack in debug:
2/event ['tags'] can just be a value not always an array If you setup Logstash into Logstash. A first logstash server with output-gelf, setup grok filter which failed, so it generated tags => ["_grokparsefailure"]. The second logstash server with gelf-input and gelf-output. The event['tags'] has in this case an array of one value on the first logstash server and just a value without an array on the second server. It crashs with the following stack in debug: