[slf4j-user] Structured logging using slf4j
Max Ng
maxwindiff at gmail.com
Tue May 12 21:33:56 CEST 2015
That's great. Thanks!
Max
On Mon, May 11, 2015 at 8:40 PM, Chetan Mehrotra <chetan.mehrotra at gmail.com>
wrote:
> If you are using Logback as the implementation you can probably make
> use of layout support [1] and provide your custom layout. The layout
> would have access to the objects passed as part of logger arguments
> and can then interpret it as per your requirement
>
> Chetan Mehrotra
> [1] http://logback.qos.ch/manual/layouts.html
>
>
> On Tue, May 12, 2015 at 6:41 AM, Max Ng <maxwindiff at gmail.com> wrote:
> > Hi,
> >
> > We have some applications which use Splunk for log analysis. To make
> better
> > use of the query language we used objects to represent log message and
> > key/value pairs. Now we are trying to move from Log4j to Slf4j and one
> issue
> > is that Slf4j only support string messages, so currently we serialize
> > key/values before calling to slf4j and rehydrate them at the layout, but
> > this is not optimal in terms of both performance and clarity. I
> understand
> > the reasons behind http://www.slf4j.org/faq.html#string_or_object
> though, so
> > is there some other way to achieve structured logging in Slf4j?
> >
> > Thanks,
> >
> > Max
> >
> >
> > _______________________________________________
> > slf4j-user mailing list
> > slf4j-user at qos.ch
> > http://mailman.qos.ch/mailman/listinfo/slf4j-user
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20150512/282d0beb/attachment.html>
More information about the slf4j-user
mailing list