emsearcy / fluent-plugin-gelf

Buffered fluentd output plugin to GELF (Graylog2)
Apache License 2.0
33 stars 57 forks source link

bypass gelf library level mapping #29

Open ivan-mjch opened 7 years ago

ivan-mjch commented 7 years ago

This gelf output plugin maps syslog levels to gelf library levels (which I think are ruby logger levels) and then the gelf library maps them back to syslog levels. This patch avoids the conversion, storing them as plain integers defines an identity mapping for the gelf library to use.

This patch should avoid the loss of message level information when it is 0 1 or 5. It works on our systems.

emsearcy commented 7 years ago

I'd prefer if this could just get fixed upstream as per Graylog2/gelf-rb#52 so we use their library in clean fashion, rather than have to work around it...

emsearcy/gelf-rb@65dd04e18aa927adade7da264e607bade86f1c77

ivan-mjch commented 7 years ago

I didn't see that.

Personally, I would ask for support for using numeric syslog levels directly, as mapping it back and forth still seems a bit silly, but yes, that should work.