hi guys,<br><br>I try to configure logback for our application in glassfish (3.1) as follows:<br><br>[*] I start gf with -Dlogback.configurationFile=/path/to/file<br><br>[*] logback.xml is:<br><i>&lt;configuration&gt;<br>&lt;!--<br>
  &lt;insertFromJNDI env-entry-name=&quot;java:app/AppName&quot; as=&quot;appName&quot; /&gt;<br>  &lt;contextName&gt;${appName}&lt;/contextName&gt;<br>--&gt;<br>  &lt;appender name=&quot;FILE&quot; class=&quot;ch.qos.logback.core.FileAppender&quot;&gt;<br>
    &lt;file&gt;../logs/r6.log&lt;/file&gt;<br>    &lt;encoder&gt;<br>      &lt;pattern&gt;%date %-5p [%thread] [%contextName] [%logger{20}] %msg%n&lt;/pattern&gt;<br>    &lt;/encoder&gt;<br>  &lt;/appender&gt;<br>  &lt;root level=&quot;debug&quot;&gt;<br>
    &lt;appender-ref ref=&quot;FILE&quot; /&gt;<br>  &lt;/root&gt;<br>&lt;/configuration&gt;<br></i><br>So far everything works fine. However I encountered a problem in the following situation.<br><br>[*] A simple message driven bean, which is invoked if there are new messages in a given &quot;jms-queue&quot; like this:<i><br>
@MessageDriven( mappedName=&quot;myQueue&quot;, activationConfig =  {<br>    @ActivationConfigProperty(propertyName = &quot;acknowledgeMode&quot;,<br>                              propertyValue = &quot;Auto-acknowledge&quot;),<br>
    @ActivationConfigProperty(propertyName = &quot;destinationType&quot;,<br>                              propertyValue = &quot;javax.jms.Queue&quot;)<br>})<br>public class MyMdb implements MessageListener {<br><br>    private static Logger logger = LoggerFactory.getLogger(MyMdb.class);<br>
<br>    @Override<br>    public void onMessage(Message msg) {<br>        <a href="http://logger.info">logger.info</a>(&quot;got message...&quot;);<br>    }<br>}</i><br><br>[*] Glassfish is not running, AND there ARE messages in the queue<br>
[*] Now when I start glassfish the application (MyMdb) start receiving the messages from the queue<br>[*] At this point logback is not yet initialized, as I see the following messages in my logfile:<br><br><i>The following loggers will not work becasue they were created during the default configuration phase of the underlying logging system.  See also <a href="http://www.slf4j.org/codes.html#substituteLogger">http://www.slf4j.org/codes.html#substituteLogger</a></i><br>
<br>Any ideas how to solve this?<br><br>tia,<br>daniel<br>