You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "fmarchioni@libero.it" <fm...@libero.it> on 2003/05/02 11:17:36 UTC

Using a JMS Appenger together with a File Appender

Hi all,
I'm trying to write an app where all application logs are sent
to a JMS queue and in turn a MDB consumes the message and writes the 
logs in a DailyFileAppender.

This is the core of my log4j.xml, which doesn't work because log message sent by the 
MDB are re-sent again in the JMS queue in an infinite loop :-( )
How do I write it correctly ? 
Thanks alot
Francesco

  <appender class="org.apache.log4j.DailyRollingFileAppender" name="FILE">
    ......
  </appender>
    
    
<appender class="org.apache.log4j.net.JMSAppender" name="JMS">
   .....
</appender>

    
        
    <category name="ejb.MdbLoggerEJB">
        <priority value="DEBUG" />
        <appender-ref ref="FILE"/>
      </category>

    <root>
        <level value="DEBUG"/>
        <appender-ref ref="JMS"/>
    </root>






---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org