Logging Category Directives

Component scoped logging directives are relative to the enclosing component profile declaration. The logging categories are component specific and will normally be documented as part of the component you are using. The following example is the logging configuration for the demonstration component included with the distribution.


<!-- A classpath declaration could be included here or under the container scope. -->
    <container name="root">
<!-- Component profile declaration. -->
     <component name="complex" 
       class="org.apache.excalibur.playground.ComplexComponent" 
       activation="true">

<!-- Multiple categories may be declared - each category defines a priority and target to be used for the respective caegory. Category names are scoped relative to the component. As such a category name of "init" translates to a full logging category path of <container-path>root.init. The logging element may contain priority and target attribute values. These values will overide the container wide defaults. -->

       <categories priority="DEBUG">
         <category name="init" priority="WARN"/>
       </categories>
     </component>

<!-- Other container declarations. -->

    </container>