|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Marker
Markers are objects that are used to add easily filterable information to log messages. Markers can be hierarchical - each Marker may have a parent. This allows for broad categories being subdivided into more specific categories. An example might be a Marker named "Error" with children named "SystemError" and "ApplicationError".
Method Summary | |
---|---|
Marker |
addParents(Marker... markers)
Adds a Marker as a parent to this Marker. |
String |
getName()
Returns the name of this Marker. |
Marker[] |
getParents()
Returns a list of parents of this Marker. |
boolean |
hasParents()
Indicates whether this Marker has references to any other Markers. |
boolean |
isInstanceOf(Marker m)
Checks whether this Marker is an instance of the specified Marker. |
boolean |
isInstanceOf(String name)
Checks whether this Marker is an instance of the specified Marker. |
boolean |
remove(Marker marker)
Removes the specified Marker as a parent of this Marker. |
Marker |
setParents(Marker... markers)
Replaces the set of parent Markers with the provided Markers. |
Method Detail |
---|
String getName()
Marker[] getParents()
null
if this Marker has no parents.boolean hasParents()
true
if the Marker has parent Markersboolean isInstanceOf(Marker m)
m
- The Marker to check.
true
if this Marker or one of its ancestors is the specified Marker, false
otherwise.
IllegalArgumentException
- if the argument is null
boolean isInstanceOf(String name)
name
- The name of the Marker.
true
if this Marker or one of its ancestors matches the specified name, false
otherwise.
IllegalArgumentException
- if the argument is null
Marker addParents(Marker... markers)
markers
- The parent markers to add.
IllegalArgumentException
- if the argument is null
Marker setParents(Marker... markers)
markers
- The new set of parent Markers or null
to clear the parents.
boolean remove(Marker marker)
marker
- The marker to remove.
true
if the marker was removed.
IllegalArgumentException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.