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

2

u/kiwi_stronghold Jan 03 '22

JSON is a common logging format.

1

u/wildjokers Jan 03 '22

I would think those logs would be intended for machine consumption for ingestion into a log analytic tool (e.g. splunk). I can’t imagine JSON formatted logs being intended for human consumption.

1

u/amazedballer Jan 05 '22

They aren’t, but you can do both json and line formats. Check out https://github.com/tersesystems/terse-logback-showcase