1 Reply Latest reply on Aug 19, 2011 9:42 AM by Narendra Choyal

    log4j don't work with EJB

    Marcos Simón Newbie

      Hi everybody,


      I´ve got a JBoss AS6 Final, where are running some web applications correctly, with theirs logs files created with log4j.


      But now I´ve created a EJB3, with Eclipse, and I put a log4j.properties file in the root source folder, but it don't work.  I try to change the location and other diferents changes, but It don't work anyway.


      In all documents finded in internet say that is esay (I thought the same before that), and I do the same steps theirs suggest, but nothing.


      My directories structure is:




                \diz\ ... (and the rest of my java class and packages)







                     \diz\ ... (and the rest of class genertes by compiler)






      And my log4.properties





      ### Logs a fichero ###






      log4j.appender.file.layout.ConversionPattern=%d %-5p %C.%M(%L): %m%n




      I suppose that is a small detail that I´ve forgotten or similar, but I can't find it !!!


      Thanks in advance,



        • 1. Re: log4j don't work with EJB
          Narendra Choyal Newbie

          Hi to all of you who read this,


          for logging in JBoss that you are Using JBoss AS 6 final,


          You directly change file


          Ex. /var/jboss/default/deploy/jboss-logging.xml


          In this file you can edit/add fileLocation, pattern as with your requirements,


          This starts your logging after server starts(i.e after bootstrap).



          for advance users:


          • you can also make LOG server( as well as master & slave log server easily).




          Narendra Choyal