org.apache.avalon.composition.logging
Class LoggingDescriptor
java.lang.Object
org.apache.avalon.composition.data.CategoryDirective
org.apache.avalon.composition.data.CategoriesDirective
org.apache.avalon.composition.logging.LoggingDescriptor
- All Implemented Interfaces:
- Serializable
- public final class LoggingDescriptor
- extends CategoriesDirective
Description of a top level logging system.
XML
A logging element declares the top level defaults for priority and target name, a set of
targets to which logging events shall be directed.
The logging element declares the application wide default logging priority.
A target element enables defintion of a logging file to which log entries will
be directed. The target name attribute is the name referenced by category elements
defined within the loggers element. The priority attribute may container one of the values
DEBUG
, INFO
, WARN
or ERROR
.
The target must contain a single file element with the attribute location
the corresponds to the name of the logging file.
<!--
Definition of a logging system.
-->
<logging name="" priority="INFO" target="kernel">
<category name="logging" priority="WARN"/>
<target name="kernel">
<file location="kernel.log" />
</target>
</logging>
- Version:
- $Revision: 1.1.1.1 $ $Date: 2003/09/24 09:31:13 $
- Author:
- Avalon Development Team
- See Also:
TargetDescriptor
,
Serialized Form
LoggingDescriptor
public LoggingDescriptor()
- Create a LoggingDescriptor instance.
LoggingDescriptor
public LoggingDescriptor(String root,
String priority,
String target,
CategoryDirective[] categories,
TargetDescriptor[] targets)
- Create a LoggingDescriptor instance.
- Parameters:
root
- the root logger category namepriority
- the default logging prioritytarget
- the default logging targetcategories
- the system categoriestargets
- the set of logging targets
getTargetDescriptors
public TargetDescriptor[] getTargetDescriptors()
- Return the set of logging target descriptors.
- Returns:
- the target descriptors
Copyright © Apache Software Foundation. All Rights Reserved.