4 Replies Latest reply on Feb 13, 2008 10:01 AM by Peter Johnson

    Turning of INFO-logging except for some categories

    Newbie

      Hi all,

      I have set the logging threshold to WARN in the CONSOLE-appender in jboss-log4j.xml. Now I want to set it only for some categories to INFO again (EARDeployer, Server). Can someone please tell me how to override the appender-settings in a category or how to get the same result (multiple appenders or sth like this).

      Thanks in advance, Peter

        • 1. Re: Turning of INFO-logging except for some categories
          Peter Johnson Master

          One you set the threshold for an appender to WARN, only WARN and ERROR messages will ever be posted there - you will never get INFO messages.

          To do what you want, you could try this (I haven't tried it so cannot vouch that it will work). Leave the threshold at INFO. Set the trace levels for com and org to WARN (you might ave to set a few more, also, depending on what show up in the trace), then set the trace levels for the things you want to INFO. Of course, this also effects the contents of server.log.

          • 2. Re: Turning of INFO-logging except for some categories
            Newbie

            Ah, works great, thank you very much.
            I commented out all category-entries in jboss-log4j.xml.
            Then I created two new ones, and mostly all messages were gone:

            <category name="com">
             <priority value="WARN"/>
            </category>
            <category name="org">
             <priority value="WARN"/>
            </category>

            An extra category enables the deploy-messages:
            <category name="org.jboss.deployment.EARDeployer">
            <priority value="INFO" />
            </category>

            On each deploy I get the following additional messages:
            INFO [EARDeployer] Init J2EE application: file:/F:/jboss/server/default/deploy/test.ear
            WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
             INFO [ServletContextListener] Welcome to Seam 2.0.0.GA
             WARN [Initialization] Did not install PojoCache due to NoClassDefFoundError: org/jgroups/MembershipListener
             INFO [EARDeployer] Started J2EE application: file:/F:/jboss/server/default/deploy/test.ear

            Are these relevant/normal?

            • 3. Re: Turning of INFO-logging except for some categories
              Newbie

               

              <category name="org.jboss.deployment.EARDeployer">
               <priority value="INFO" />
               </category>




              • 4. Re: Turning of INFO-logging except for some categories
                Peter Johnson Master

                The second warning is probably because you are running the "default" configuration and not the "all" configuration and is expected - some of the code dynamically determines if clustering is available and generates a warning if not. Not sure on the other one. But warning messages typically do not indicate a problem.