[logback-user] insertFromJNDI behavior

Ove Hiltwein ove.hiltwein at immunai.com
Fri Nov 11 08:12:11 CET 2022


For our tomcat (10.0.23) web application, we use an env-entry to specify 
the context name in the logback configuration file:
     <insertFromJNDI env-entry-name="java:comp/env/loggingContextName" 
as="loggingContextName" />

This context name is also used in defining the log file name:
     <appender name="ERRORFILE" 
             <pattern>%d{ISO8601} %5p [%X{session}] [%c]: %m%n</pattern>
         <filter class="ch.qos.logback.classic.filter.ThresholdFilter">

And in web.xml we define that environment entry:

This configuration is in accordance with 

Using logback-classic in version 1.2.11, the corresponding log 
information is written to the file server_v4_error_2022-11-09.log, as 

However, after upgrading to logback-classic version 1.4.4 (or 1.3.4), 
the corresponding log information is written to a file 
loggingContextName_IS_UNDEFINED_error_2022-11-09.log, and tomcat prints 
the following to the console during startup:
14:11:58,019 |-ERROR in 
ch.qos.logback.core.model.processor.DefaultProcessor at 1390cc4c - Can't 
handle model of type class 
ch.qos.logback.core.model.InsertFromJNDIModel  with tag: insertFromJNDI 
at line 5

What am I missing here?

Many thanks
Ove Hiltwein

Ove Hiltwein @ Nebion AG (an Immunai company) / Zurich (CH)

PLEASE NOTE: The information contained in this message is privileged and 
confidential, and is intended only for the use of the individual to whom it 
is addressed and others who have been specifically authorized to receive 
it. If you are not the intended recipient, you are hereby notified that any 
dissemination, distribution, or copying of this communication is strictly 
prohibited. If you have received this communication in error, or if any 
problems occur with the transmission, please contact the sender.

More information about the logback-user mailing list