Closed the-james-burton closed 8 years ago
After further testing, I noticed the addField
method is String, String
. Therefore to support other data types, this code is preferred...
// gelfMessage.addField(key, fields.get(key));
gelfMessage.getAdditonalFields().put(key, fields.get(key));
Here is a PR for #102. It might be done better by merging the logic into the existing
GelfAppender
and offering a boolean to the user to turn JSON parsing on or off. I'll leave that decision to you.I've updated the README.md too. I'm not sure why GitHub thinks the whole file is changed... I only added the "Automatically populating fields from a JSON message" section.
Hope this helps!
Regards, James