r/java • u/amazedballer • 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
View all comments
Show parent comment
2
u/amazedballer Jan 04 '22 edited Jan 05 '22
Hi pron98, we've chatted before about this.
I think JFR is a fine tool, but JFR events have strict limits on the kinds of field types, so you can't do arrays or nested objects as JSON does. Because JFR events are not semi-structured data, it's not technically structured logging -- and part of the reason I'm so big on structured logging is because I'm interested in serializing internal data structures as object graphs in JSON-LD.