t0xa / gelfj

Graylog Extended Log Format (GELF) implementation in Java and log4j appender without any dependencies.
https://github.com/t0xa/gelfj/wiki
Other
187 stars 115 forks source link

Add context to gelf message? #105

Open alekc opened 8 years ago

alekc commented 8 years ago

Hi, I am trying to figure out the way to add a context to logged gelf message (noob in java), with no lock for now.

I.e. I want to log a message "User Logged In", with additional fields (ip, browser, someInfo) which would be translated in ctxt_ on graylog. Is it possible to do this in Java?

t0xa commented 8 years ago

Hey Alekc, sorry I've missed your assistance request. Did you solve it or you still need help?

alekc commented 8 years ago

no worries, I've moved to custom solution (using low level https://github.com/Graylog2/gelfclient), although if it's possible to use something like threadcontext or other solution feel free to share :)