org.apache.avalon.composition.logging
Class LoggingDescriptor

java.lang.Object
  extended byorg.apache.avalon.composition.data.CategoryDirective
      extended byorg.apache.avalon.composition.data.CategoriesDirective
          extended byorg.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

Field Summary
 
Fields inherited from class org.apache.avalon.composition.data.CategoryDirective
DEBUG, ERROR, INFO, WARN
 
Constructor Summary
LoggingDescriptor()
          Create a LoggingDescriptor instance.
LoggingDescriptor(String root, String priority, String target, CategoryDirective[] categories, TargetDescriptor[] targets)
          Create a LoggingDescriptor instance.
 
Method Summary
 TargetDescriptor[] getTargetDescriptors()
          Return the set of logging target descriptors.
 
Methods inherited from class org.apache.avalon.composition.data.CategoriesDirective
equals, getCategories, getCategoryDirective, hashCode
 
Methods inherited from class org.apache.avalon.composition.data.CategoryDirective
getName, getPriority, getTarget
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 name
priority - the default logging priority
target - the default logging target
categories - the system categories
targets - the set of logging targets
Method Detail

getTargetDescriptors

public TargetDescriptor[] getTargetDescriptors()
Return the set of logging target descriptors.

Returns:
the target descriptors


Copyright © Apache Software Foundation. All Rights Reserved.