Apache log4cxx Version 0.10.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Appender Class Referenceabstract

Implement this interface for your own strategies for outputting log statements. More...

Inherits OptionHandler.

Inherited by AppenderSkeleton`[virtual]`.

## Public Member Functions
virtual | ~Appender ()
virtual void | addFilter (const spi::FilterPtr &newFilter)=0
| Add a filter to the end of the filter list. More...
virtual spi::FilterPtr | getFilter () const =0
| Returns the head Filter. More...
virtual void | clearFilters ()=0
| Clear the list of filters by removing all the filters in it. More...
virtual void | close ()=0
| Release any resources allocated within the appender such as file handles, network connections, etc. More...
virtual void | doAppend (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool)=0
| Log in `Appender` specific way. More...
virtual LogString | getName () const =0
| Get the name of this appender. More...
virtual void | setLayout (const LayoutPtr &layout)=0
| Set the Layout for this appender. More...
virtual LayoutPtr | getLayout () const =0
| Returns this appenders layout. More...
virtual void | setName (const LogString &name)=0
| Set the name of this appender. More...
virtual bool | requiresLayout () const =0
| Configurators call this method to determine if the appender requires a layout. More...
Public Member Functions inherited from OptionHandler
virtual | ~OptionHandler ()
virtual void | activateOptions (log4cxx::helpers::Pool &p)=0
| Activate the options that were previously set with calls to option setters. More...
virtual void | setOption (const LogString &option, const LogString &value)=0
| Set `option` to `value`. More...
Public Member Functions inherited from Object
virtual const helpers::Class & | getClass () const
virtual | ~Object ()
virtual void | addRef () const =0
virtual void | releaseRef () const =0
virtual bool | instanceof (const Class &clazz) const =0
virtual const void * | cast (const Class &clazz) const =0

## Additional Inherited Members
Static Public Member Functions inherited from Object
static const helpers::Class & | getStaticClass ()
static const log4cxx::helpers::ClassRegistration & | registerClass ()

## Detailed Description

Implement this interface for your own strategies for outputting log statements.

## Constructor & Destructor Documentation

virtual ~Appender | ( |  | ) |
| inline virtual

## Member Function Documentation

virtual void addFilter | ( | const spi::FilterPtr & | newFilter | ) |
| pure virtual

Add a filter to the end of the filter list.

Implemented in AppenderSkeleton.

virtual void clearFilters | ( |  | ) |
| pure virtual

Clear the list of filters by removing all the filters in it.

Implemented in AppenderSkeleton.

virtual void close | ( |  | ) |
| pure virtual

Release any resources allocated within the appender such as file handles, network connections, etc.

It is a programming error to append to a closed appender.

Implemented in ODBCAppender, WriterAppender, SocketHubAppender, TelnetAppender, RollingFileAppenderSkeleton, SMTPAppender, AsyncAppender, SocketAppenderSkeleton, NTEventLogAppender, SyslogAppender, and OutputDebugStringAppender.

virtual void doAppend | ( | const spi::LoggingEventPtr & | event,
|  | log4cxx::helpers::Pool & | pool
| ) |  |
| pure virtual

Log in `Appender` specific way.

When appropriate, Loggers will call the `doAppend` method of appender implementations in order to log.

Implemented in AppenderSkeleton.

virtual spi::FilterPtr getFilter | ( |  | ) | const
| pure virtual

Returns the head Filter.

The Filters are organized in a linked list and so all Filters on this Appender are available through the result.

Returns
  the head Filter or null, if no Filters are present

Implemented in AppenderSkeleton.

virtual LayoutPtr getLayout | ( |  | ) | const
| pure virtual

Returns this appenders layout.

Implemented in AppenderSkeleton.

virtual LogString getName | ( |  | ) | const
| pure virtual

Get the name of this appender.

The name uniquely identifies the appender.

Implemented in AppenderSkeleton.

virtual bool requiresLayout | ( |  | ) | const
| pure virtual

Configurators call this method to determine if the appender requires a layout.

If this method returns `true`, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal. If this method returns `false`, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator..

In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return `true`.

Implemented in ODBCAppender, WriterAppender, SocketHubAppender, SMTPAppender, AsyncAppender, TelnetAppender, SocketAppenderSkeleton, SyslogAppender, NTEventLogAppender, and OutputDebugStringAppender.

virtual void setLayout | ( | const LayoutPtr & | layout | ) |
| pure virtual

Set the Layout for this appender.

Implemented in AppenderSkeleton.

virtual void setName | ( | const LogString & | name | ) |
| pure virtual

Set the name of this appender.

The name is used by other components to identify this appender.

Implemented in AppenderSkeleton.

The documentation for this class was generated from the following file:

- appender.h