JCL registration in Glassfish via SLF4j
I am trying to set up application logging on a Glassfish server. I am using SLF4j to aggregate everything and log bindings to write files. I also added libraries to the project
. Of course, there is
also Logback. All libraries are in the project
So the idea is this: redirect everything to SLF4j and then write the log using Logback.
In the code, I have the following snippet to test:
jclLog.debug("Login JCL: Debug level"); jclLog.error("Login JCL: Error level"); log4jLog.debug("Login Log4j: Debug level"); log4jLog.error("Login Log4j: Error level"); slfLog.debug("Login SLF4j: Debug level"); slfLog.error("Login SLF4j: Error level");
Once executed, there are log4j and SLF4j log entries in the Loglog-configured log files. But there are no JCL entries. Instead, they receive a server.log file.
Question: Why are JCL entries being caught by Glassfish and how can it be prevented?
source to share