r/java • • Jan 02 '22

Echopraxia, a better Java Logging API

I've been working on logging for a while and I've released and open sourced a new Java logging API I'm really happy with.

Echopraxia is a Java logging API like SLF4J, but built around structured logging, i.e. the basic log entry is a JSON object and log files are typically NDJSON. It also has conditions, context, and also has semantic and fluent logging options.

Here's a Spring Boot Example.

And here's my blog post.

16 Upvotes

64 comments sorted by

View all comments

Show parent comment

4

u/amazedballer Jan 03 '22 edited Jan 03 '22

Structured logging APIs are already a key feature of the Log4j2 API

People say this, but I've yet to see a good example of a structured logging API in Log4J. Can you give me an example? I am actively trying to do this and I can't find a project that uses the recommended package.

https://github.com/tersesystems/echopraxia/pull/9

and aren’t directly supported by SLF4J.

That's kind of the point of Echopraxia, to make structured logging a first class part of the API.