Re: How to disable message logging to Console and files from JCS
Thomas Vandahl <[email protected]> Thu, 6 Feb 2025 10:47:00 +0100
| Newsgroups | gmane.comp.jakarta.commons.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Piotr, > Am 06.02.2025 um 10:29 schrieb Piotr P. Karwasz <[email protected]>: > > Hi Thomas, > > On 6.02.2025 09:06, Thomas Vandahl wrote: >> JCS uses java.util.logging by default. To switch to Log4J2, you need the system property -Djcs.logSystem=log4j2 >> See https://commons.apache.org/proper/commons-jcs/UpgradingFrom2x.html > > Why do we even use a logging wrapper? I have created JCS-241[1] to rewrite the log calls to use Log4j API directly. It should be fairly easy to do it using OpenRewrite. 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. Bye, Thomas