4 ms·
176K LOC. For a logging library? Oh! It's for Java. It all makes sense now. (Yes, I've written in Java, and, of course, I used log4j in the project.) Just rem
by TheRealDunkirk 5y ago
176K LOC. For a logging library? Oh! It's for Java. It all makes sense now.
(Yes, I've written in Java, and, of course, I used log4j in the project.)
Just reminds me of this: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
- Spivak 5y agoLog4j has a stupid amount of features though, it's basically a full featured logging library, plus Filebeat and Logstash all in one lib.
- TheRealDunkirk 5y agoI get it, but it really makes the case that the bog-standard library that literally EVERYONE on EVERY Java project uses be simpler, and push those other features out to other libraries.
- scottlamb 5y ago> Log4j has a stupid amount of features though, it's basically a full featured logging library, plus Filebeat and Logstash all in one lib. "Stupid" for once is the correct word. I don't want a feature where my log library downloads code from an LDAP server and runs it. I don't want a feature where interpolation is run not only on my hardcoded format string but also in the variables it references. When software has many features, we often assume they're disabled unless we deliberately enable them and so they do little harm (other than increased code size). But this kind of on by default behavior is something else entirely.
- skim_milk 5y agoFor comparison, in .NET Core the default logger and all extensions in the dotnet/runtime repo are 9014 LOC (19.5k if including tests) find -E src/libraries -iregex '.*\.cs$' | grep 'src/libraries/Microsoft.Extensions.Logging' | grep -v 'tests' | xargs cat | grep -v -e '^$' | wc -l
- phendrenad2 5y agoThat's funny, but it actually doesn't make sense. Java file operations involve a lot of boilerplate, so it's understandable that logging frameworks exist in Java. However, as the leading framework, log4j quickly developed "Feature Creep" and now... it has templating? A plugin architecture? Translations? Can it parse POP3 email logs yet? https://en.wikipedia.org/wiki/Feature_creep https://en.wikipedia.org/wiki/Feature_creep https://en.wikipedia.org/wiki/Second-system_effect https://en.wikipedia.org/wiki/Second-system_effect http://www.catb.org/jargon/html/Z/Zawinskis-Law.html http://www.catb.org/jargon/html/Z/Zawinskis-Law.html