[slf4j-user] FYI - structured logging wrapper for SLF4J

Jordan Zimmerman jordan at jordanzimmerman.com
Tue Oct 1 21:08:41 CEST 2019


> JSON is a proper superset of what you'd put into a structured log message, so I am still not so sure about the added value of Maple.


I'm not sure what you mean. Can you give more details? In any event, Maple supports custom formatters. On my dev machine I have a GELF formatter for Maple (GELF is a JSON format). 

The benefit of Maple is that standardizes the generation of structured logging. In other solutions, you have to format the fields/values at the call site or manually set them into a data structure. Maple, allows creation of a schema that formalizes field names and value types. See the example here: https://github.com/Randgalt/maple/blob/master/maple-examples/src/main/java/com/myco/app/request/RequestHandler.java <https://github.com/Randgalt/maple/blob/master/maple-examples/src/main/java/com/myco/app/request/RequestHandler.java>

-JZ

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20191001/5f19b087/attachment.html>


More information about the slf4j-user mailing list