public interface Target
Target implementations receive log events
and output information from these events to the appropriate output
destination which may be a console, log file or some other custom
destination.| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(String value)
Adds the category filteer that the
Target will process
log events for. |
void |
addLogger(Logger logger)
Adds a
Logger whose category matches the filters list for
the Target. |
List |
getFilters()
Returns the category filters defined for the
Target. |
short |
getLevel()
Returns the log level that the
Target will process log
events for. |
void |
initialize(String id,
ConfigMap properties)
Initializes the target with id and properties.
|
void |
logEvent(LogEvent event)
Logs a log event out to the
Targets output destination,
which may be the console or a log file. |
void |
removeFilter(String value)
Removes a category filter from the list of filters the
Target will
process log events for. |
void |
removeLogger(Logger logger)
Removes a
Logger from the Target. |
void |
setFilters(List value)
Sets the category filters that the
Target will process
log events for. |
void |
setLevel(short value)
Sets the log level that the
Target will process log events
for. |
void initialize(String id, ConfigMap properties)
id - id for the target.properties - ConfigMap of properties for the target.List getFilters()
Target.Target.void setFilters(List value)
Target will process
log events for.value - The category filters that the Target will processvoid addFilter(String value)
Target will process
log events for.value - The new category filter to add to the Target's list of filters.void removeFilter(String value)
Target will
process log events for.value - The category filter to remove from the Target's list of filters.short getLevel()
Target will process log
events for. Log events at this level, or at a higher priority level
will be processed.Target will process log events for.void setLevel(short value)
Target will process log events
for. Log events at this level, or at a higher priority level will be
processed.value - The log level that the Target will process log events for.void addLogger(Logger logger)
Logger whose category matches the filters list for
the Target. The Logger will dispatch log events
to this Target to be output.logger - The Logger to add.void removeLogger(Logger logger)
Logger from the Target.logger - The Logger to remove.void logEvent(LogEvent event)
Targets output destination,
which may be the console or a log file.event - The LogEvent containing the information to output.Copyright © 2015 The Apache Software Foundation. All rights reserved.