org.apache.logging.log4j.core
Interface Appender

All Superinterfaces:
LifeCycle
All Known Implementing Classes:
AbstractAppender, AbstractDatabaseAppender, AbstractOutputStreamAppender, AsyncAppender, ConsoleAppender, FailoverAppender, FileAppender, JdbcAppender, JmsQueueAppender, JmsTopicAppender, JpaAppender, RandomAccessFileAppender, RewriteAppender, RollingFileAppender, RollingRandomAccessFileAppender, RoutingAppender, SmtpAppender, SocketAppender, SyslogAppender

public interface Appender
extends LifeCycle

Appends log events.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
LifeCycle.State
 
Method Summary
 void append(LogEvent event)
          Log in Appender specific way.
 ErrorHandler getHandler()
           
 Layout<? extends Serializable> getLayout()
          Returns this appender's layout.
 String getName()
          Get the name of this appender.
 boolean ignoreExceptions()
          Some appenders need to propagate exceptions back to the application.
 void setHandler(ErrorHandler handler)
           
 
Methods inherited from interface org.apache.logging.log4j.core.LifeCycle
isStarted, isStopped, 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<? extends Serializable> getLayout()
Returns this appender's layout.

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

ignoreExceptions

boolean ignoreExceptions()
Some appenders need to propagate exceptions back to the application. When ignoreExceptions is false the AppenderControl will allow the exception to percolate.

Returns:
true if exceptions will be logged but now thrown, false otherwise.

getHandler

ErrorHandler getHandler()

setHandler

void setHandler(ErrorHandler handler)


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.