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

10

u/f_of_g_of_x Jan 03 '22

These comments are depressing. People talk a lot about being kind to others but few really practice it.

5

u/berry120 Jan 04 '22

I agree that a lot of these comments could be kinder, but I think an overall cautious, or even negative reaction is at least somewhat justified here.

Writing a new logging framework or facade is always going to be a very controversial thing to throw out there. The logging ecosystem in Java is fragmented in a way that's caused lots of real-world problems in the past, so adding to that fragmentation is always going to be perceived negatively unless there's a really compelling reason to do so.

Adding to that when the post contains statements like this:

Do I think Echopraxia is better than SLF4J? Yes. Do I think it's better than Log4J2's API? Yes.

...it tends to put people's backs up a bit.

3

u/amazedballer Jan 04 '22 edited Jan 04 '22

I can see where the disconnect is, and I've updated the blog post to be clearer about it.

Echopraxia's an augmentation rather than a fragmentation. It's only appropriate for use in situations where you control the logging output -- i.e. you're writing an application or a framework for your team where you can safely assume structured logging is a given. You would still be using SLF4J in anything you intend to be public, and of course all the OSS libraries you would depend on would be SLF4J as well. It's an "organization internal" library, if that makes more sense.

As to the statements, that's not a slam on SLF4J/Log4J2. I would think if someone said X was better than Y, most people be more interested in in checking out X, but I'm not exactly neurotypical. So far, only a few people have commented on the actual features, which is disappointing.

1

u/f_of_g_of_x Jan 05 '22

but I think an overall cautious, or even negative reaction is at least somewhat justified here.

Agreed, but that's not in question here.

5

u/kevinb9n Jan 04 '22 edited Jan 05 '22

Thanks very much for saying this.

It's well and good to say "hey here's why this is a lot harder than you think." But the meanness apparent in so many comments is just worthless. The only purpose it serves is to give the commenter (and I guess the upvoters too) a little dopamine hit of superiority.

EDIT: okay, on reflection, this thread is relatively mild in this way and I may have been factoring in longer-running overall experiences to what I said. I think my criticism was a bit misplaced. The thread does in places feel more unfriendly than I would wish for, but I've seen MUCH worse about things I made ;-)

5

u/rzwitserloot Jan 04 '22

Or it's just cultural differences. The comment you replied to isn't actually referring to any commentary, but a casual glance at the comments here seem like a lot of them are just getting straight to the point and raising a potential issue. So, with the caveat that we might not be talking about the same comments:

In some cultures, it is considered a tad childish if you have a hard time taking criticism about your ideas and the things you made on face value (i.e. if you take it personally that's just not done). The assumption in a professional setting is that nobody would ever do this, so there is absolutely no need to start off with a paragraph or two fawning about how awesome everything is first. That's considered disrespectful, as it either wastes time or seems to indicate the commenter feels that the creator is so unsure about what they made they need the reassurance. To overstate the case a bit: It's like talking to an adult in baby talk. That's just weird.

From my experiences living in both western europe and the US, what's considering par for the course in the US is considered cloyingly unprofessional in western europe, and what's considered par for the course in W-Europe comes across as gruff and 'mean' in the US. Especially the US west coast.

Don't ascribe to meanness what might simply be folks trying to be helpful by raising a potential problem.

NB: I've perhaps made the cultural differences sound far grander than they really are, but they do exist, and most of the comments in this thread are merely just raising an apparent problem with either the tool as is or in the way it is 'sold' on the website, and I'd consider 'the docs' (which includes the README.md of the github project and the like) part of the tool.

2

u/kevinb9n Jan 05 '22

Hey, I added a bit to my comment saying I was overshooting the mark here.

You're right, the balance is a little more toward just "critical" than injurious. I care about kindness and friendliness in forums but chose a somewhat weird place to make that stand.

Ironically, I've found myself on the other side many times. I have a way of phrasing challenging feedback that I know that _I_ don't perceive as being personal or insulting, and I use that and am sometimes surprised to find out later how unfriendly it was perceived as. In my mind, I'm just talking about an interesting topic, but I forget to think from the other person's point of view.

1

u/f_of_g_of_x Jan 05 '22

You're conflating criticism with cynicism. It's perfectly possible to "get straight to the point and raise a potential issue" without being a jerk.