3 Replies Latest reply on Oct 28, 2013 5:45 PM by James Perkins

    Log4j Logging in a module

    kotinao7 Newbie

      Hi,

      I want to create a module for my jboss application server 7.1.1.

      Here is my module.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>
      
      <module xmlns="urn:jboss:module:1.0" name="ecard.hsm">
        <resources>
          <resource-root path="hsm.jar"/>
        </resources>
        <dependencies>
          <module name="org.jboss.log4j.logmanager"/>
          <module name="org.slf4j"/>
          <module name="org.jboss.logging"/>
          <module name="my.iaik"/>
          <module name="org.jboss.logmanager" services="import"/>
        </dependencies>
      </module>
      
      

       

      My Application code:

      import org.apache.log4j.Logger;
      ...
        private static final Logger LOG = Logger.getLogger(DelegationProvider.class.getName());
        LOG.error("log me");
      
      

       

      It seems that the log messages is lost anywhere, and is not redirected to the application server?

       

      Have I done anything wrong?

       

      Thank you for your help!