<div dir="ltr">That's great. Thanks!<div><br></div><div>Max</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 8:40 PM, Chetan Mehrotra <span dir="ltr"><<a href="mailto:chetan.mehrotra@gmail.com" target="_blank">chetan.mehrotra@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you are using Logback as the implementation you can probably make<br>
use of layout support [1] and provide your custom layout. The layout<br>
would have access to the objects passed as part of logger arguments<br>
and can then interpret it as per your requirement<br>
<br>
Chetan Mehrotra<br>
[1] <a href="http://logback.qos.ch/manual/layouts.html" target="_blank">http://logback.qos.ch/manual/layouts.html</a><br>
<div><div class="h5"><br>
<br>
On Tue, May 12, 2015 at 6:41 AM, Max Ng <<a href="mailto:maxwindiff@gmail.com">maxwindiff@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> We have some applications which use Splunk for log analysis. To make better<br>
> use of the query language we used objects to represent log message and<br>
> key/value pairs. Now we are trying to move from Log4j to Slf4j and one issue<br>
> is that Slf4j only support string messages, so currently we serialize<br>
> key/values before calling to slf4j and rehydrate them at the layout, but<br>
> this is not optimal in terms of both performance and clarity. I understand<br>
> the reasons behind <a href="http://www.slf4j.org/faq.html#string_or_object" target="_blank">http://www.slf4j.org/faq.html#string_or_object</a> though, so<br>
> is there some other way to achieve structured logging in Slf4j?<br>
><br>
> Thanks,<br>
><br>
> Max<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> slf4j-user mailing list<br>
> <a href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br>
> <a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a><br>
_______________________________________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a><br>
</blockquote></div><br></div>