1 Reply Latest reply on Sep 24, 2011 2:25 AM by jaikiran pai

    Log4J Configuration Problems with JBoss 7.0.1 Final

    Hauke Gulich Newbie

      Hello everyone,


      after getting used to the new JBoss 7 (I come from JBoss 4) I managed to get everything to work, exept Log4j.


      In my classes I do this:




      import org.apache.log4j.Logger;


      public class JMSSender {

          private static final Logger logger = Logger.getLogger(JMSSender.class);




          public void something() {





      But I get this message




      21:35:10,396 ERROR [stderr] (http-- log4j:WARN No appenders could be found for logger (de.hauke.client.jms.JMSSender).


      21:35:10,396 ERROR [stderr] (http-- log4j:WARN Please initialize the log4j system properly.


      21:35:10,396 ERROR [stderr] (http-- log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.



      I am using maven and I put this dependency to my project











      Can somebody tell me how to configure log4j correctly? Do I have to create a log4j.xml file in my resources folder and deploy that with my ear file? I thought log4j takes to configuration from jboss. Do I have to use the LoggerFactory in some way?


      Best regards,



      PS: Sorry for the layout in this thread, but something isn't working here ... I will try to fix that tomorrow