Closed tomdz closed 6 years ago
Can you add a simple test for the empty log lines handling? Thank you very much!
@lennartkoopmann: I've added a couple tests for the change.
Thank you! Will test tonight or tomorrow and then happily merge.
I just ran into this issue today myself -- fortunately we have a wrapper class that makes it easy to work around, but it would be great to get this merged into the gem too.
Thanks for this patch!
@tomdz Could you please sign the TORCH Contributor Agreement as outlined in CONTRIBUTING.md and send it to hello@torch.sh?
Hi guys, any news about this patch ? Would be great to make it to master. If needed I'll be happy to make this go forward. (I've rebased this branch here: https://github.com/paulRbr/gelf-rb/tree/tomdz/short_message_fix)
as of missing updates i'll close this PR now - We would like to merge that if we receive a new PR, based on master branch and with a signed CLA
Rails likes to log empty lines, particularly ActionView. Unfortunately that triggers an exception in the
Notifier#check_presence_of_mandatory_attributes
method because theshort_message
value is an empty string. This change ensures that messages send to the Notifier always have a non-emptyshort_message
field. Empty log lines and hashes without ashort_message
value will be ignored. This change also allows to specify thefacility
in the log message if it is a hash which is useful when used in combination with other logging frameworks or even in your logging own code.