1 2 Previous Next 19 Replies Latest reply on Apr 14, 2012 2:38 PM by jamezp Go to original post
      • 15. Re: Log4j configuration in JBoss AS7
        wdfink

        Looks strange (as  James Perkins said)

        how do you call your Log class.

        I normally not use such central classes for logging.

        I add a 'private static final Logger' to my class and use it direct (e.g. from a SLSB)

         

        What if you add your app without additional configuration, any errors? The root-logger should add your logging to the server.log if you use the correct level (e.g. ERROR/WARN/INFO).

        This should work without SLF4J and errors.

        • 16. Re: Log4j configuration in JBoss AS7
          haroonfoad

          Mr. James,

          I am also confused . What I want to use is log4j not slf4j.

          I will delete slf4j dependencies right now.

          But this will not fix my problem.

          • 17. Re: Log4j configuration in JBoss AS7
            haroonfoad

            I have noticed that my logs are added to the server.log but not my log wessal-web.log.

            I dont have log4j.xml in my app.

            Any idea?

            • 18. Re: Log4j configuration in JBoss AS7
              haroonfoad

              Of course,

              no need for central class for logging.To log, it is easy to code like this:

               

              Logger.getLogger(HibernateUtil.class.getName()).log(Level.INFO, "sessionFactory Created");

               

              But still not log to my file . only to the server.log

              • 19. Re: Log4j configuration in JBoss AS7
                jamezp

                What is the package name of HibernateUtil.class? If it's not com.lit.wessal it won't show up in your log file. The only records that will show up in wessal-web are any loggers that have at least a category of com.lit.wessal at a level INFO or higher. I've done something similar before and never had any problems. Maybe if you could paste the entire logging subsystem XML from your standalone.xml I might be able to see something. Also Maybe paste a class with a code sample if that's possible.

                1 2 Previous Next