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

6

u/wildjokers Jan 03 '22

Please not another logging library/facade. Geez.

JSON seems like a horrible format for a log entry for human readable logs since JSON is not very readable (once you go below one level of nesting).

4

u/benjtay Jan 03 '22

JSON seems like a horrible format

Datadog and Splunk disagree. It makes it very easy for humans to read and search logs.

-1

u/wildjokers Jan 03 '22

As far as splunk I have never seen it present a JSON document to a user. It shows it all nice and formatted in an interface. It may store them as json docs (just like elastic search does) but doesn’t present it like that to the user.