org.apache.logging.log4j
Interface Marker

All Superinterfaces:
Serializable

public interface Marker
extends Serializable

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
 String getName()
          Returns the name of this Marker.
 Marker getParent()
          Returns the parent of this Marker.
 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.
 

Method Detail

getName

String getName()
Returns the name of this Marker.

Returns:
The name of the Marker.

getParent

Marker getParent()
Returns the parent of this Marker.

Returns:
The parent Marker or null if this Marker has no parent.

isInstanceOf

boolean isInstanceOf(Marker m)
Checks whether this Marker is an instance of the specified Marker.

Parameters:
m - The Marker to check.
Returns:
true of this Marker or one of its ancestors is the specified Marker, false otherwise.

isInstanceOf

boolean isInstanceOf(String name)
Checks whether this Marker is an instance of the specified Marker.

Parameters:
name - The name of the Marker.
Returns:
true of this Marker or one of its ancestors matches the specified name, false otherwise.


Copyright © 1999-2013 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.