Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom fields to log POJOs to JSON log #60

Open
dkirrane opened this issue Mar 28, 2016 · 0 comments
Open

Custom fields to log POJOs to JSON log #60

dkirrane opened this issue Mar 28, 2016 · 0 comments

Comments

@dkirrane
Copy link

Is there an option equivalent to the logback json logger to log POJOs in JSON format?

The logback json logger supports logging POJOs

import static net.logstash.logback.argument.StructuredArguments.*
Foo foo  = new Foo();
logger.info("log message {}", value("foo", foo));

or

import static net.logstash.logback.marker.Markers.*
Foo foo  = new Foo();
logger.info(append("foo", foo), "log message");

https://github.com/logstash/logstash-logback-encoder#loggingevent_custom_event

@dkirrane dkirrane changed the title Custom fields to log POJOs to JOSN log Custom fields to log POJOs to JSON log Mar 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant