Hi Thomas,
It works now to hide ALL log messages completely.

export
CLASSPATH=${CLASSPATH}:/scratch/jjeong/JCS/test2/lib/log4j-api-2.20.0.jar
export
CLASSPATH=${CLASSPATH}:/scratch/jjeong/JCS/test3/lib/log4j-core-2.20.0.jar

${JAVA_HOME}/bin/java -classpath ${CLASSPATH} -Djcs.logSystem=log4j2
-Dlog4j.configurationFile=file:/scratch/jjeong/JCS/test3/config/log4j2.xml
TestMain

[jjeong@john-oel8 test3]$ sh runTest.sh
Enter command (1:checkout/2:return/3:register/quit) : quit
[jjeong@john-oel8 test3]$


Yes, we need to hide all log messages from JCS sometimes.
In the case of production env where the setup is done for a very critical
and complex business operations with high load, we don't want to overload
the log files for log messages from cache mechanisms
as we are more interested in the actual business operations.
As we can modify the log level of JCS loggers dynamically, we can
enable them with any log level if required.

Thanks for all your help. You are awesome !

John



On Fri, Feb 7, 2025 at 5:07 AM Thomas Vandahl <t...@apache.org> wrote:

> Hi John,
>
> > Am 06.02.2025 um 18:03 schrieb John Jeong <john.y.je...@gmail.com>:
> >
> > Thanks Thomas,
> > After applying the non-fatal messages are gone.
> > But there are ERROR messages in the console.
> >
> > [jjeong@john-oel8 test3]$ ./runTest.sh
> > ERROR StatusLogger Log4j2 could not find a logging implementation. Please
> > add log4j-core to the classpath. Using SimpleLogger to log to the
> console...
>
> This line basically tells you what is wrong.
>
> > ERROR LateralTCPService Could not create sender to [localhost:1119] --
> > Cannot connect to localhost:1119
> > ERROR LateralTCPCacheFactory Failure, lateral instance will use zombie
> > service
> > java.io.IOException: Cannot connect to localhost:1119
> > at
> >
> org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPSender.init(LateralTCPSender.java:141)
> > at
> >
> org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPSender.<init>(LateralTCPSender.java:116)
> > at
> >
> org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPService.<init>(LateralTCPService.java:96)
> > at
> >
> org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory.lambda$getCSNLInstance$0(LateralTCPCacheFactory.java:271)
> > at
> >
> java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
> >
> > @members of this community.
> > Is there anyways to disable ALL log messages of JCS completely ?
>
> Are you actually sure that you want to silence error messages like these?
> It tells you that something is wrong with your configuration.
>
> Bye, Thomas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>

Reply via email to