[logback-user] Request and response using Logback
Troy Hart
troy.hart at gmail.com
Wed Nov 20 06:38:24 CET 2013
Yes, logback does this well in fact.
I can show you and example of a logback encoder that encodes to a JSON
format. You can extend the concept to encode XML just the same. Possibly
you could use very similar code to mine and abstract your message
formatting into a builder pattern.
For my money though, I'd stick with JSON. I'd also steer you toward
Logstash and Kibana as a killer combo for dealing with logs--both of these
tools are free and open source.
I attached some (incomplete WRT to dependencies) code that should get the
main point across.
Good Luck.
Troy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20131119/e3cee11c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GsonLoggingEventBuilder.java
Type: text/x-java
Size: 1081 bytes
Desc: not available
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20131119/e3cee11c/attachment.java>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JsonEncoder.java
Type: text/x-java
Size: 3433 bytes
Desc: not available
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20131119/e3cee11c/attachment-0001.java>
More information about the Logback-user
mailing list