Hi Thomas,
On 6.02.2025 10:47, Thomas Vandahl wrote:
One main design principle of JCS always was to have as few external
dependencies as possible. In fact, JCS 3.0 core only depends on JDK.
Therefore, JUL was chosen as a logging framework. Log4j2 is an option. You may
easily roll your own logging system, such as SLF4j. The wrapper was created to
provide this versatility.
I know that not having dependencies is a very attractive characteristic,
but how does that work in practice? Among the users of Commons JCS
provided by MvnRepository[1] I see almost only big frameworks that
wouldn't mind 300 KiB of (mostly unused) code. That is assuming Log4j
API is not already there as transitive dependency. I know that
MvnRepository gives a very narrow perspective on how an artifact is
used, but my first impression is that users will not be impacted by an
additional dependency.
On the other hand I see that JCS has a dozen log statements in total.
Maybe using JUL directly should be enough? This could be replaced with
`System.Logger` once Java 9 is selected as baseline.
Piotr
PS: I would not have any problems using SLF4J, although that is a
single-maintainer project and nobody knows what will happen, when Ceki
retires.
[1]
https://mvnrepository.com/artifact/org.apache.commons/commons-jcs3-core/usages
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org