osiegmar/logback-gelf

Differences from other Gelf encoders

andrebrait opened this issue ยท 7 comments

It seems the layout used here differs a bit from other popular solutions for other logging frameworks, such as Log4J2's own Gelf encoder).

The two main differences is that Log4J2's sends thread instead of thread_name and logger instead of logger_name.

Unfortunately, this makes filtering logs by such fields a bit of a hassle when there are different systems with different logging frameworks sending logs to the same logstash server.

Would you mind changing this? (I can send the PR, I just need the green light ๐Ÿ˜„)

It could also be made a configuration to change the names of those properties, if you think that's better :)

As there is no standard for the field names of logger_name and thread_name, I've seen many different variations in the wild. I don't want to change the current names as they are not better or worse than any other (and break the compatibility).
But making these configurable is probably a very good idea for those having to manage different applications and their logs. Green light for a PR ;-)

@osiegmar Done ๐Ÿ˜‰

Thanks!

Np :-)

I'll watch for releases here so I can update the services that use it when thus gets included in a release

Just released.

@osiegmar thanks a lot. It's already working nicely here :)