Categories Directive
Description
The logging channels used by a component may be parameterized using a categories directive. Each category with a categories directive enables customization of the priority and targets of logging channels used by the component.
Attributes
Attribute | Required | Description |
---|---|---|
priority | no | The default logging priority (one of INFO, WARN, ERROR, FATAL, DEBUG) to assign to the component. |
target | no | Named default logging target. |
Nested Elements
Element | Cardinality | Description |
---|---|---|
category | 0..n | Logging sub-category directive. |
Sample XML
<!-- Create a component with a logging channel priority of INFO. Set the subsidiary channel for tutorial.data to a priority of DEBUG and the tutorial.data.model channel to a ERROR priority. --> <component name="tutorial"> <categories priority="INFO"> <category name="/data" priority="DEBUG"/> <category name="/data/model" priority="ERROR"/> </categories> </component>