0 Replies Latest reply on Mar 19, 2004 2:37 AM by Daniel Schaller

    Log4J problem with logging from EJB

    Daniel Schaller Newbie

      Hi all,

      we use Log4J to log messages from EJBs and MBeans. The classes are all below one package, lets say "com.mypackage.ejbs" and "com.mypackage.mbeans". We have definded one file appender and one logger in "conf/log4j.xml":

      <appender name="JEXAM" class="org.jboss.logging.appender.DailyRollingFileAppender">
       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
       <param name="File" value="/log/jexam.log"/>
       <param name="Append" value="false"/>
      
       <!-- Rollover each month -->
       <param name="DatePattern" value="'.'yyyy-MM"/>
      
       <!-- Rollover at midnight each day
       <param name="DatePattern" value="'.'yyyy-MM-dd"/>
       -->
       <!-- Rollover at the top of each hour
       <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
       -->
      
       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %-5p [%c{1}] %m%n"/>
       </layout>
      </appender>
      
      
      <logger name="com.mypackage">
       <level value="info"/>
       <appender-ref ref="JEXAM"/>
      </logger>
      



      The problem is that for the MBeans logging works fine whereas it doesn't work for the EJBs, i.e. there are no messages in the files.


      Thanks in advance for your help,
      Thorsten