[slf4j-user] Recommendation for library writers: use thiscopy and paste wrapper around SLF4j to avoid default static initialization

Joachim Durchholz jo at durchholz.org
Sat Mar 18 22:17:25 CET 2017


Am 18.03.2017 um 21:26 schrieb Adam Gent:
> I mean I generally agree my arguments are fairly weak because I'm
> defending a small minority of libraries. That is part because
> libraries that have these problems (chicken/egg, performance issues)

I still need to see how these problems even exist.

> just avoid logging all together or write their own (e.g.
> https://github.com/EsotericSoftware/kryo has its own).

Kryo does its own logging not due to chicken/egg problems but because 
Nathan believes the complexity of an extra logger implementation is 
totally worth it if you can optimize out the logger.trace calls statically.
It's a minority position, and one that I don't share because if we 
really start to count function calls then Java isn't the right tool for 
the job anyway.
What happened is that people stopped arguing with Nathan and started 
writing an SLF4J adapter for Kryo, which seems to be working fine.


More information about the slf4j-user mailing list