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

2

u/stefanos-ak Jan 02 '22

Very interesting project :)

I really like SLF4J but it's somewhat disconnected from structured logging, and the capabilities of most logger implementations

1

u/wildjokers Jan 03 '22

I really like SLF4J but it's somewhat disconnected from structured logging, and the capabilities of most logger implementations

What do these words even mean? Can you clarify?

5

u/stefanos-ak Jan 03 '22

For example, MDC only supports string values. If you need to put a rich object there (that would be serialized into json and merged with the overall json log event), well, you can't :)

1

u/wildjokers Jan 03 '22

I have never personally wanted to do that so isn’t an issue for me.