org.apache.avalon.composition.data
Class CategoryDirective

java.lang.Object
  extended byorg.apache.avalon.composition.data.CategoryDirective
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CategoriesDirective

public class CategoryDirective
extends Object
implements Serializable

A logging category descriptor hierachy. The descriptor contains a category name, a optional priority value, and an optional target. If the priority or target values null, the resulting value will be derived from the parent category desciptor. A category descriptor may 0-n subsidiary categories. CategoryDirective names are relative. For example, the category "orb" will appear as "my-app.orb" if the parent category name is "my-app".

XML

    <categories priority="INFO">
      <category priority="DEBUG"  name="loader" />
      <category priority="WARN"  name="types" />
      <category priority="ERROR"  name="types.builder" target="default"/>
      <category name="profiles" />
      <category name="lifecycle" />
      <category name="verifier" />
    </categories>
 

Version:
$Revision: 1.1.1.1 $ $Date: 2003/08/31 14:26:46 $
Author:
Avalon Development Team
See Also:
Serialized Form

Field Summary
static String DEBUG
          Constant category priority value for debug mode.
static String ERROR
          Constant category priority value for error mode.
static String INFO
          Constant category priority value for info mode.
static String WARN
          Constant category priority value for warning mode.
 
Constructor Summary
CategoryDirective(String name)
          Creation of a new CategoryDirective using a supplied name.
CategoryDirective(String name, String priority)
          Creation of a new CategoryDirective using a supplied name and priority.
CategoryDirective(String name, String priority, String target)
          Creation of a new CategoryDirective using a supplied name, priority, target and collection of subsidiary categories.
 
Method Summary
 boolean equals(Object other)
           
 String getName()
          Return the category name.
 String getPriority()
          Return the logging priority for the category.
 String getTarget()
          Return the default log target for the category.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final String DEBUG
Constant category priority value for debug mode.

See Also:
Constant Field Values

INFO

public static final String INFO
Constant category priority value for info mode.

See Also:
Constant Field Values

WARN

public static final String WARN
Constant category priority value for warning mode.

See Also:
Constant Field Values

ERROR

public static final String ERROR
Constant category priority value for error mode.

See Also:
Constant Field Values
Constructor Detail

CategoryDirective

public CategoryDirective(String name)
Creation of a new CategoryDirective using a supplied name.

Parameters:
name - the category name

CategoryDirective

public CategoryDirective(String name,
                         String priority)
Creation of a new CategoryDirective using a supplied name and priority.

Parameters:
name - the category name
priority - the category priority - DEBUG, INFO, WARN, or ERROR

CategoryDirective

public CategoryDirective(String name,
                         String priority,
                         String target)
Creation of a new CategoryDirective using a supplied name, priority, target and collection of subsidiary categories.

Parameters:
name - the category name
priority - the category priority - DEBUG, INFO, WARN, or ERROR
target - the name of a logging category target
Method Detail

getName

public String getName()
Return the category name.

Returns:
the category name

getPriority

public String getPriority()
Return the logging priority for the category.

Returns:
the logging priority for the category

getTarget

public String getTarget()
Return the default log target for the category.

Returns:
the default target name

equals

public boolean equals(Object other)

hashCode

public int hashCode()


Copyright © Apache Software Foundation. All Rights Reserved.