3 ms·
>I feel like the examples of log4j and ua-parser aren't that great, because it would be relatively easy for any other similar lib to take their place Log4j is
by javajosh 5y ago
>I feel like the examples of log4j and ua-parser aren't that great, because it would be relatively easy for any other similar lib to take their place
Log4j is a good example, anyway. It's an old library, very old. And a lot of other software depends on it. So the effort of replacing log4j is not proportional to it's feature list, but rather to the feature list times the number of projects already depending on it. (The replacement exists, btw, called slf4j, usually with logback, written by the same author as log4j.)
Java Logging is a subject in itself (I won't say "interesting subject" although it is interesting, in the same disturbing way the lifecycle of a tapeworm is interesting.) but I would argue that these logging libraries are old and have evolved over time in ways that are hard to anticipate or recreate. (Rewriting things also leads you to the xkcd "standard proliferation problem" - https://xkcd.com/927/ https://xkcd.com/927/)
The real problem is that it takes time, like real calendar time, to understand an implementation fully enough to fix it, and no-one wants to do that, because it's a job as critical as it is thankless.
- dehrmann 5y agoI tend to use Logback for new code an the slf4j log4j bridge when an old library (usually Hadoop) likes log4j. Log4j hasn't been the first choice in Java logging for a while.