org.apache.logging.log4j.core
Interface Appender<T extends Serializable>

Type Parameters:
T - The Layout's Serializable type.
All Superinterfaces:
LifeCycle
All Known Implementing Classes:
AbstractAppender, AbstractOutputStreamAppender, AsynchAppender, ConsoleAppender, FailoverAppender, FastFileAppender, FastRollingFileAppender, FileAppender, JMSQueueAppender, JMSTopicAppender, RewriteAppender, RollingFileAppender, RoutingAppender, SMTPAppender, SocketAppender, SyslogAppender

public interface Appender<T extends Serializable>
extends LifeCycle

Appends log events.


Method Summary
 void append(LogEvent event)
          Log in Appender specific way.
 ErrorHandler getHandler()
           
 Layout<T> getLayout()
          Returns this appender's layout.
 String getName()
          Get the name of this appender.
 boolean isExceptionSuppressed()
          If set to true any exceptions thrown by the Appender will be logged but not thrown.
 void setHandler(ErrorHandler handler)
           
 
Methods inherited from interface org.apache.logging.log4j.core.LifeCycle
isStarted, start, stop
 

Method Detail

append

void append(LogEvent event)
Log in Appender specific way. When appropriate, Loggers will call the doAppend method of appender implementations in order to log.

Parameters:
event - The LogEvent.

getName

String getName()
Get the name of this appender.

Returns:
name, may be null.

getLayout

Layout<T> getLayout()
Returns this appender's layout.

Returns:
the Layout for the Appender or null if none is configured.

isExceptionSuppressed

boolean isExceptionSuppressed()
If set to true any exceptions thrown by the Appender will be logged but not thrown.

Returns:
true if Exceptions should be suppressed, false otherwise.

getHandler

ErrorHandler getHandler()

setHandler

void setHandler(ErrorHandler handler)


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.