11 Replies Latest reply on Jun 11, 2012 2:48 PM by Kelly Dolan

    JBoss 7 log configuration not working as expected

    Kelly Dolan Newbie

      I'm confused so I appreciate anyone who can straighten me out.

       

      Overall what I'm trying to achieve is:

      * application messages (e.g., my.company) at ERROR level log in both application.log and server.log

      * all other messages at ERROR level in server.log (w/ the exception of those marked WARN)

      * the INFO  [org.jboss.as.server.deployment.DeploymentHandlerUtil$1] JBAS018559: Deployed "someapp" message in the console

       

      Two things to note:

      * I'm okay w/ displaying the initial INFO log messages driven by the standard logging.properties file in the console.

      * Before I started to constrain logging, I logged everything at INFO level to all files and the console to see what was actually being logged

       

      Currently, my standalone.xml file contains the following:

       

      <subsystem xmlns="urn:jboss:domain:logging:1.1">

          <console-handler name="CONSOLE" autoflush="true">

               <level name="ERROR"/>

              <formatter>

                  <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C] %m%n"/>

              </formatter>

              <target name="System.out"/>

          </console-handler>

          <periodic-rotating-file-handler name="SERVER" autoflush="true">

              <level name="ERROR"/>

               <formatter>

                  <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C] %m%n"/>

              </formatter>

              <file relative-to="jboss.server.log.dir" path="server.log"/>

              <suffix value=".yyyy-MM-dd"/>

              <append value="true"/>

          </periodic-rotating-file-handler>

          <periodic-rotating-file-handler name="APPLICATION" autoflush="true">

              <level name="ERROR"/>

               <formatter>

                  <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C] %m%n"/>

              </formatter>

              <file relative-to="jboss.server.log.dir" path="application.log"/>

              <suffix value=".yyyy-MM-dd"/>

              <append value="true"/>

          </periodic-rotating-file-handler>

          <logger category="com.arjuna">

               <level name="WARN"/>

          </logger>

          <logger category="org.apache.tomcat.util.modeler">

               <level name="WARN"/>

          </logger>

          <logger category="sun.rmi">

              <level name="WARN"/>

          </logger>

          <logger category="jacorb">

              <level name="WARN"/>

          </logger>

          <logger category="jacorb.config">

              <level name="ERROR"/>

          </logger>

          <logger category="my.company">

              <level name="ERROR"/>

              <handlers>

                  <handler name="APPLICATION"/>

              </handlers>

          </logger>

          <logger category="org.jboss.as.server.deployment">

              <level name="INFO"/>

              <handlers>

                  <handler name="CONSOLE"/>

              </handlers>

          </logger>

          <root-logger>

              <handlers>

                  <handler name="SERVER"/>

              </handlers>

          </root-logger>

      </subsystem>

       

      Given the above,

      * in the console, I ONLY see the INFO messages driven by logging.properties (i.e., up to Removing bootstrap log handlers)

      * in server.log, I see nothing

      * in application.log I see nothing

       

       

      Problem #1:

      There being nothing in server.log and application.log is correct.  However, I expected to see a bunch of messages on the console....all those logged from the "org.jboss.as.server.deployment" package which includes the "Deployed" message but also much more.

       

      I expected <logger category="org.jboss.as.server.deployment"><level name="INFO"/> to take precedence over <console-handler name="CONSOLE" autoflush="true"><level name="ERROR"/>.  In other words, since that logger is configured to use the CONSOLE handler, in addition to only logging messages at ERROR level, also log messages that come from the org.jboss.as.server.deployment package at INFO level.

       

      So, I changed the <console-handler> level to INFO.  Given this, more messages were logged to the console (e.g., found something to deploy, started to deploy) but after that nothing despite the fact that I know there are in fact more non-application INFO messages (e.g., deployed).

       

      If I also change <root-logger> to include <handler name="CONSOLE"/>, I now get LOTS of messages in the console including the "Deployed" message which is what I'm looking for.  However, all of these messages include those logged from packages I don't want to see (e.g., org.jboss.as.web).  I figured this is the result of the <console-handler> level set to INFO.

       

      So, I changed the <console-handler> level back to ERROR.  Given this, I'm back to seeing ONLY the INFO messages driven by logging.properties

       

       

      Problem #2:

      Going back to the original configuration above, if I want to see INFO messages logged from "my.company" classes in application.log, I changed <logger category="my.company"><level name="ERROR"/> to INFO.  Nothing.  I guess this really might be the same as Problem #1.

       

      So, I tried one more change and that was to add use-parent-handlers="false> to <logger category="my.company"> Nothing.

       

       

      At this point, I don't know what to try or what I'm doing wrong.  I have the expectation that the recognition of log level, handler, and category for <logger> elements takes precedence over those for <console-handler> and <...file-handler> just like the standard log4j.xml configuration worked.  However, I'm not finding this to be the case.  There is VERY little documentation on this.  The log schema does not help.  And I've found nothing through other posts, etc.  It really shouldn't be this hard.

        • 1. Re: JBoss 7 log configuration not working as expected
          Kelly Dolan Newbie

          I did some more digging and here's where I'm at now.

           

          First, I found JIRA issues https://issues.jboss.org/browse/AS7-1501 and https://issues.jboss.org/browse/AS7-2318 that provide some helpful information re: precedence.  If I understand it correctly, child log levels take precedence over the root-logger level BUT <*-handler> log levels take precedence over all.  So, one would want to set the <*-handler> log levels to the most detailed level one would ever want and restrict to less detail w/ the loggers.

           

          Given that new information and the original configuration in my previous post, I changed all of my <*-handler> log levels to INFO and the <logger category="my.company"> log level to INFO.

           

          On start of JBoss,

          * on the console, I had the INFO messages driven by logging.properties AND the INFO messages "Found <app> in deployment directory..." and "Starting deployment of <app>".  Past this there were no more INFO messages on the console.

          * in application.log, I had the INFO messages logged from my.company classes

          * in server.log, I had everything on the CONSOLE + everything in application.log + all the other non-application INFO messages I expected to see on the console.

          • 2. Re: JBoss 7 log configuration not working as expected
            James Perkins Master

            Problem #1:

            There being nothing in server.log and application.log is correct.  However, I expected to see a bunch of messages on the console....all those logged from the "org.jboss.as.server.deployment" package which includes the "Deployed" message but also much more.

             

            I expected <logger category="org.jboss.as.server.deployment"><level name="INFO"/> to take precedence over <console-handler name="CONSOLE" autoflush="true"><level name="ERROR"/>.  In other words, since that logger is configured to use the CONSOLE handler, in addition to only logging messages at ERROR level, also log messages that come from the org.jboss.as.server.deployment package at INFO level.

             

            So, I changed the <console-handler> level to INFO.  Given this, more messages were logged to the console (e.g., found something to deploy, started to deploy) but after that nothing despite the fact that I know there are in fact more non-application INFO messages (e.g., deployed).

             

            If I also change <root-logger> to include <handler name="CONSOLE"/>, I now get LOTS of messages in the console including the "Deployed" message which is what I'm looking for.  However, all of these messages include those logged from packages I don't want to see (e.g., org.jboss.as.web).  I figured this is the result of the <console-handler> level set to INFO.

             

            So, I changed the <console-handler> level back to ERROR.  Given this, I'm back to seeing ONLY the INFO messages driven by logging.properties

             

             

            All log messages are first check the logger's level and then are passed to handlers. The handler then checks the level of the log record and decides whether to publish the record or not. If you want INFO messages to show up on the console, you have to set the level on the console to INFO.

             

            The root logger is the base logger for everything. All log records are processed through the root logger and therefore it's handlers unless it's explicitly told not to via the use-parent-handler attribute.

             

            If you want a logger (category) to not be logged you need to define a logger for it and set the level to something like NONE.

             

             

            Problem #2:

            Going back to the original configuration above, if I want to see INFO messages logged from "my.company" classes in application.log, I changed <logger category="my.company"><level name="ERROR"/> to INFO.  Nothing.  I guess this really might be the same as Problem #1.

             

            So, I tried one more change and that was to add use-parent-handlers="false> to <logger category="my.company"> Nothing.

             

             

            At this point, I don't know what to try or what I'm doing wrong.  I have the expectation that the recognition of log level, handler, and category for <logger> elements takes precedence over those for <console-handler> and <...file-handler> just like the standard log4j.xml configuration worked.  However, I'm not finding this to be the case.  There is VERY little documentation on this.  The log schema does not help.  And I've found nothing through other posts, etc.  It really shouldn't be this hard.

             

             

            If I understand correctly;

            • You want error messages from your application to print in your own log file.
            • All error and warning messages, including ones from your application, should print in the server.log, but not informational or lower.
            • Everything in the category org.jboss.as.server.deployment at least informational level should be printed on the console.

             

            If so the below configuration should be what you're looking for.

             

             

            <subsystem xmlns="urn:jboss:domain:logging:1.1">
                <console-handler name="CONSOLE" autoflush="true">
                     <level name="INFO"/>
                    <formatter>
                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C] %m%n"/>
                    </formatter>
                    <target name="System.out"/>
                </console-handler>
                <periodic-rotating-file-handler name="SERVER" autoflush="true">
                    <level name="WARN"/>
                     <formatter>
                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C] %m%n"/>
                    </formatter>
                    <file relative-to="jboss.server.log.dir" path="server.log"/>
                    <suffix value=".yyyy-MM-dd"/>
                    <append value="true"/>
                </periodic-rotating-file-handler>
                <periodic-rotating-file-handler name="APPLICATION" autoflush="true">
                    <level name="ERROR"/>
                     <formatter>
                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C] %m%n"/>
                    </formatter>
                    <file relative-to="jboss.server.log.dir" path="application.log"/>
                    <suffix value=".yyyy-MM-dd"/>
                    <append value="true"/>
                </periodic-rotating-file-handler>
                <logger category="com.arjuna">
                     <level name="WARN"/>
                </logger>
                <logger category="org.apache.tomcat.util.modeler">
                     <level name="WARN"/>
                </logger>
                <logger category="sun.rmi">
                    <level name="WARN"/>
                </logger>
                <logger category="jacorb">
                    <level name="WARN"/>
                </logger>
                <logger category="jacorb.config">
                    <level name="ERROR"/>
                </logger>
                <logger category="my.company">
                    <handlers>
                        <handler name="APPLICATION"/>
                    </handlers>
                </logger>
                <logger category="org.jboss.as.server.deployment">
                    <level name="INFO"/>
                    <handlers>
                        <handler name="CONSOLE"/>
                    </handlers>
                </logger>
                <root-logger>
                    <level name="WARN"/>
                    <handlers>
                        <handler name="SERVER"/>
                    </handlers>
                </root-logger>
            </subsystem>
            
            

             

            Setting the root logger level here tells every undefined category to only publish the log record if it's at least a warning message.

             

            If I'm wrong in reading what you were after feel free to let me know. I'm sure there is a way to do what you're trying to accomplish :-)

             

            --

            James R. Perkins

            • 3. Re: JBoss 7 log configuration not working as expected
              Kelly Dolan Newbie

              Thanks James for the response.  Your understanding of what I'm trying to achieve (at least what I presented) is correct.  And the configuration you provided achieves just that w/ the exception of the issue I reported at https://issues.jboss.org/browse/AS7-4964.

               

              Ultimately, my goal however is to limit the category org.jboss.as.server.deployment to the single class that logs the "Deployed" INFO message (see the same link above for more details).

               

              So now after experimenting more, I have additional thoughts to which I hope you can respond.

               

              Let's assume we have a problem in production and I wanted to increase the log level of "my.company" to INFO.  I determined the way to get the INFO messages for my.company logged to the APPLICATION handler was to (a) change level=INFO for the handler and (b) add level=INFO to the logger.  The second was necessary because I assume filtering defaulted to the root-logger level (WARN).  The my.company INFO messages were not logged in server.log.

               

              If I want the INFO messages in server.log as well, I determined the need to change the SERVER handler level=INFO.

               

              So the configuration model that I'm seeing for JBoss is one in which

              (a) the handler must define the * broadest * level that may be logged

              (b) the loggers are used to * restrict * the level logged for the named categories and if a level is not specified, it defaults to the root-logger level

              (c) categories not named by loggers are logged at the level defined by the root-logger

               

              Our current JBoss 4 implementation uses a log4j.xml configuration file and I noticed JBoss 7 supports this as described by the documentation.  So, I'm trying to evaluate which way we want to go when we upgrade to JBoss 7.

               

              The model I see for log4j.xml is one in which

              (a) then appenders define the * strictest * level that may be logged

              (b) the loggers are used to * broaden * the level logged for the named categories

               

              In essense, both logging models seem to be the inverse of the other.

               

              One of the big pros I see w/ JBoss logging is the ability to change what is logged at runtime.  I really do like that.  I'm sure our customer service folk will like that.  Changes to log4j.xml require a restart.

               

              I'm still struggling a bit though w/ the overall model. 

               

              W/ log4j.xml, assuming appenders are set to ERROR so that only errors are logged for everything by default, if I want to broaden what I'm logging for something specific I can simply define a logger for that something and know that I am only impacting that something.  And if I want that information logged to multiple appenders, I still am only defining this w/ the newly added logger.

               

              W/ JBoss logging if I want to do the same (assuming all handlers are set to ERROR), I have to broaden one or more handlers, I have to add the logger but more importantly I now have to concern myself as to whether or not I've broadened logging for other things as the result of broadening the handler.  Or do I? 

               

              It is the added complexity of what must be done to broaden a case that keeps me undecided at this time.  Any points of view that may be helpful for me to understand the model or qualm my fears are greatly appreciated.

               

              Thanks!

              Kelly

              • 4. Re: JBoss 7 log configuration not working as expected
                James Perkins Master

                Hello Kelly,

                No JBoss Logging is just like log4j in how the hierarchy works. Let me make an attempt to explain how the workflow works.

                 

                We'll assume here a log record is just a message and a log level (in reality it's more than that, but we'll go for simplicity here).

                1. A message is logged, Logger.getLogger("org.jboss.example").info("This is an info message")
                2. The log record is passed to the logger which first checks that it can publish info messages
                3. If the logger can print info messages, it checks to see if there are handlers attached.
                4. If handlers are attached to that specific logger, org.jboss.example in our case, the log record is then passed to that handler.
                5. When the log record is passed to a handler the handler then checks to see if it can publish info messages. If it can the log record is published. If it cannot the log record is ignored.
                6. If the logger does not have any handlers attached, then the next category is checked to see if it has handlers attached until it get's down to an empty category which is the root logger. Steps 4-6 are repeated until all loggers, including root, have been exhausted.

                 

                In the case above a handler would have to be set to accept at least INFO messages. The root logger would also have to be set to accept INFO messages unless you have a logger (category) defined as "org", "org.jboss" or "org.jboss.example" that accepts at least INFO messages.

                 

                The general rules are as follows;

                • Set the root logger level to the level you want see, e.g. INFO.
                • Add handlers to the root level where you want all log messages to go.
                • Only define loggers if you want to assign a specific handler to a category or need a different acceptance level than the root logger.
                • Only restrict a handlers level if you don't want to ever see a specific level published to it. For example on the console you might not ever want to see TRACE or DEBUG messages so you would likely use an INFO level on a console.

                 

                I think I see now where the confusion with log4j and JBoss Log Manager are coming in now. In the server.log handler we don't have a level assigned for a specific purpose. If you want to turn on debugging to the server log all you need to do is add a logger, since root is set to INFO by default, with the category you want to debug and set the level to DEBUG. Messages will start being printed to the server.log immediately. If there were a level associated with the server.log handler, you might have to change that level to if it's not at least set to  DEBUG.

                 

                So in a sense we do encourage you to keep handlers at the broadest level possible and restrict with loggers, mainly the root logger. It's not a workflow difference as much as a philosophical difference.

                 

                Hopefully that all makes sense. Please let me know if you want me to clarify anything.

                 

                --

                James R. Perkins

                1 of 1 people found this helpful
                • 5. Re: JBoss 7 log configuration not working as expected
                  Kelly Dolan Newbie

                  Many thanks for the explanation.  I think I'm beginning to understand better

                   

                  Changing course just a little, I've got what I need in terms of logging except for the "Deployed" messages.  To recap, I need the INFO "Deployed" message to display on the console, I don't want any other INFO messages to be displayed and I need to ensure WARN+ messages associated w/ the same category still log to server.log.

                   

                  Given the feedback on the JIRA issue, my interpretion of the missing INFO message boils down to misinterpreting category vs. package.  The "Deployed" message, although logged from a class in the org.jboss.as.server.deployment package is actually associated w/ the org.jboss.as.server category.  So it's disappearance w/ category=org.jboss.as.server.deployment is not a bug.  Rather, my logger must set category=org.jboss.as.server.

                   

                  Given your configuration above w/ that one small change, I find a INFO and WARN org.jboss.as.server.* messages in the console and WARN messages in server.log.  A sampling includes:

                   

                  12:00:07,276 INFO  [org.jboss.as.server.deployment.scanner] JBAS015003: Found myapp.ear in deployment directory. To trigger deployment create a file called myapp.ear.dodeploy

                  12:00:07,651 INFO  [org.jboss.as.server.deployment] JBAS015876: Starting deployment of "myapp.ear"

                  12:00:10,401 WARN  [org.jboss.as.server.deployment] Class Path entry commons-collections.jar in "struts.jar"  does not point to a valid jar for a Class-Path reference.

                  12:00:27,229 WARN  [org.jboss.as.dependency.private] JBAS018567: Deployment "deployment.myapp.ear.myui.war" is using a private module ("org.apache.commons.io:main") which may be changed or removed in future versions without notice.

                  12:00:50,323 INFO  [org.jboss.as.server] JBAS018559: Deployed "myapp.ear"

                   

                  David (in the JIRA issue) suggested the use of filters to aid in the goal of whittling the INFO messages down to just the one I want.  So, I tried modifying my logger to be:

                   

                  <logger category="org.jboss.as.server">

                      <level name="INFO"/>

                      <filter>

                          <match pattern="JBAS018559"/>

                      </filter>

                      <handlers>

                          <handler name="CONSOLE"/>

                      </handlers>

                  </logger>

                   

                  Since only the "Deployed" message contains "JBAS018559" I only expected this message to match and display on the console. 

                   

                  * <match pattern="JBAS018559"/> - all messages in sample list were displayed (not expected)

                   

                  To test if <filter> was actually doing anything, I changed "JBAS018559" to "KELLY" (something silly). 

                   

                  * <match pattern="KELLY"/> - all messages in sample list BUT the "Deployed" message were displayed (not expected...I have no explanation why)

                   

                  Since <match> is documented to exclude or include the match, I thought I might have to negate it.

                   

                  * <not><match pattern="KELLY"/></not> - all messages in sample list were displayed (expected)

                  * <not><match pattern="JBAS018559"/></not> - all messages in sample list BUT the "Deployed" message were displayed (expected)

                   

                  Finally, I moved the filter to the handler (vs. logger). 

                   

                  * <console-handler>...<match pattern="JBAS018559"/> - YES! Only the "Deployed" message are displayed in the console and I'm still seeing WARN messages in server.log.

                   

                     

                  Questions:

                   

                  1. Why does the <logger><filter> not work as I expect?

                   

                  2. Do I really want the filter on the <logger> or on the <*-handler>?  My guess is the logger.  I suspect a filter being associated w/ the handler means all <loggers> associated w/ that handler have the filter applied.  In my particular case, this handler only has one logger so putting it in either case should do no harm.  However, if I wanted to log additional messages to the console temporarily having the filter on the CONSOLE handler would be problematic.

                   

                  3. How does a <logger> filter factor into the equation when trying to determine if a message should be logged?  For example, the my.company logger is related to the APPLICATION handler directly and the SERVER handler inherited from the root-logger.  If the my.company logger had a filter, would it filter messages for the APPLICATION handler only or both APPLICATION and SERVER handlers?

                   

                     

                  Thanks!

                  Kelly

                  • 6. Re: JBoss 7 log configuration not working as expected
                    James Perkins Master

                    1. Why does the <logger><filter> not work as I expect?

                    It works, but like you said maybe not as expected. Filters are not inherited on loggers so you need to place the filter very specificly on the logger. Though I did notice you did that.

                     

                     

                    2. Do I really want the filter on the <logger> or on the <*-handler>?  My guess is the logger.  I suspect a filter being associated w/ the handler means all <loggers> associated w/ that handler have the filter applied.  In my particular case, this handler only has one logger so putting it in either case should do no harm.  However, if I wanted to log additional messages to the console temporarily having the filter on the CONSOLE handler would be problematic.

                    You are correct, in your case you would prefer it on the logger.

                     

                     

                    3. How does a <logger> filter factor into the equation when trying to determine if a message should be logged?  For example, the my.company logger is related to the APPLICATION handler directly and the SERVER handler inherited from the root-logger.  If the my.company logger had a filter, would it filter messages for the APPLICATION handler only or both APPLICATION and SERVER handlers?

                    Both as long as the it was created with a category of "my.company" and a handler was placed on the specific category "my.company".

                     

                    If you could paste your new logging subsystem XML we can see what might be going wrong. It could be the maybe something else is also being logged to the console, but I'm just not sure.

                     

                    --

                    James R. Perkins

                    • 7. Re: JBoss 7 log configuration not working as expected
                      Kelly Dolan Newbie

                      Here it is...  Currently, the filter is on the console-handler which achieves what I need.  To re-create the unexpected behavior (i.e., I see all JBoss INFO messages in console so it doesn't appear to filter anything), move the <filter> element to the org.jboss.as.server <logger>.

                       

                              <subsystem xmlns="urn:jboss:domain:logging:1.1">

                                  <console-handler name="STATUS" autoflush="true">

                                      <level name="INFO"/>

                                      <filter>

                                          <match pattern="JBAS018559"/>

                                      </filter>

                                      <formatter>

                                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>

                                      </formatter>

                                      <target name="System.out"/>

                                  </console-handler>

                                  <periodic-rotating-file-handler name="SERVER" autoflush="true">

                                      <level name="WARN"/>

                                      <formatter>

                                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %m%n"/>

                                      </formatter>

                                      <file relative-to="jboss.server.log.dir" path="server.log"/>

                                      <suffix value=".yyyy-MM-dd"/>

                                      <append value="true"/>

                                  </periodic-rotating-file-handler>

                                  <periodic-rotating-file-handler name="APPLICATION" autoflush="true">

                                      <level name="ERROR"/>

                                      <formatter>

                                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %m%n"/>

                                      </formatter>

                                      <file relative-to="jboss.server.log.dir" path="application.log"/>

                                      <suffix value=".yyyy-MM-dd"/>

                                      <append value="true"/>

                                  </periodic-rotating-file-handler>

                                  <logger category="com.arjuna">

                                      <level name="WARN"/>

                                  </logger>

                                  <logger category="org.apache.tomcat.util.modeler">

                                      <level name="WARN"/>

                                  </logger>

                                  <logger category="sun.rmi">

                                      <level name="WARN"/>

                                  </logger>

                                  <logger category="jacorb">

                                      <level name="WARN"/>

                                  </logger>

                                  <logger category="jacorb.config">

                                      <level name="ERROR"/>

                                  </logger>

                                  <logger category="com.inmedius">

                                      <handlers>

                                          <handler name="APPLICATION"/>

                                      </handlers>

                                  </logger>

                                  <logger category="org.jboss.as.server">

                                      <level name="INFO"/>

                                      <handlers>

                                          <handler name="STATUS"/>

                                      </handlers>

                                  </logger>

                                  <root-logger>

                                      <level name="WARN"/>

                                      <handlers>

                                          <handler name="SERVER"/>

                                      </handlers>

                                  </root-logger>

                              </subsystem>

                      • 8. Re: JBoss 7 log configuration not working as expected
                        James Perkins Master

                        Kelly,

                        Not sure why I didn't catch it earlier, but you will need the filter on the handler in your case. The reason you see all the messages in the console is because filters are not inherited by loggers. Meaning it will only filter log records that are written to org.jboss.as.server specifically.

                         

                        --

                        James R. Perkins

                        • 9. Re: JBoss 7 log configuration not working as expected
                          Kelly Dolan Newbie

                          So if I hear correctly what you're saying, given the following

                           

                          <logger category="org.jboss.as.server">

                            <level name="INFO"/>

                            <filter>some filter</filter>

                            <handlers>

                              <handler name="STATUS"/>

                            </handlers>

                          </logger>

                           

                          (a) the fact that I have a logger specified for the category, this now permits all INFO+ messages for the specified category AND its sub-categories (e.g., org.jboss.as.server.deployment) to be logged by the associated handlers (then of course, it's up to the handler as to whether or not its permissible)

                           

                          but...

                           

                          (b) the filter only applies to org.jboss.as.server

                           

                          If so, bummer...is it possible to request this be consistent or was this intentional?

                           

                          Kelly

                          • 10. Re: JBoss 7 log configuration not working as expected
                            James Perkins Master

                            Kelly,

                            Correct. It's kind of a complicated issue really. While in your specific case it could work, but once you defined a logger with the category org.jboss.as.server.deployment you would see results you wouldn't really expect.

                             

                            You could file a feature request, https://issues.jboss.org/browse/LOGMGR, but I'm not sure how David feels about it. I can see both sides being valid really.

                             

                            --

                            James R. Perkins

                            • 11. Re: JBoss 7 log configuration not working as expected
                              Kelly Dolan Newbie

                              I opened https://issues.jboss.org/browse/LOGMGR-45.  I don't know what the right thing is and I don't have a complete understanding of everything, so we'll see where it goes.  At least now, I have what I need and understand the behaviors I've encountered thus far.

                               

                              Thanks for all your help.  It really has been great learning experience.

                               

                              Kelly