2 Replies Latest reply on Feb 12, 2003 6:01 PM by brei

    JBoss 3.0.2, log4j, Decreasing priority doesn't work (?)

    richardberger

      Wanting to change the logging level for my own applications, I have read the helpful posts and used (in conf/log4j.xml):



      and this works fine - I see "INFO" level for jboss, and "FATAL" level for my app. However, if I have:



      then, I only see "INFO" level.

      It appears that I cannot see MORE than the setting for JBoss (which is INFO). Am I doing something wrong? My test code looks like:

      logger.debug("This is debug");
      logger.info("This is info");
      logger.warn("This is warn");
      logger.error("This is error");
      logger.fatal("This is fatal");

      Thanks so much to anyone who can shed some light on this or provide a pointer! (sure, no pointers in Java, I know :) :) )

      RB

        • 1. Re: JBoss 3.0.2, log4j, Decreasing priority doesn't work (?)
          richardberger

          Following the usual paradigm:
          1. Bang head on wall for hours
          2. Post message to forum
          3. Immediately figure out the answer
          4. Post answer as reply to original post
          5. Realize no one will ever read it anyway :)

          OK, in order to do what I wanted (which is to log DEBUG messages from my app to the console), I needed to set up my own ConsoleAppender, I could not reuse the same one that JBoss was using as that Appender had a threshold associated with it.

          Here is the relevant section of my log4j.xml:



          <!-- The default pattern: Date Priority [Category] Message\n -->






          <appender-ref ref="CONSOLERB"/>


          Hope this is useful to someone...
          RB

          • 2. Re: JBoss 3.0.2, log4j, Decreasing priority doesn't work (?)
            brei

            Hi RB,

            it was useful for me :-)

            Thanks
            Reto