log4cpp
1.1.1
|
Implement this interface for your own strategies for printing log statements. More...
#include <Appender.hh>
Public Member Functions | |
virtual | ~Appender () |
Destructor for Appender. More... | |
virtual void | doAppend (const LoggingEvent &event)=0 |
Log in Appender specific way. More... | |
virtual bool | reopen ()=0 |
Reopens the output destination of this Appender, e.g. More... | |
virtual void | close ()=0 |
Release any resources allocated within the appender such as file handles, network connections, etc. More... | |
virtual bool | requiresLayout () const =0 |
Check if the appender uses a layout. More... | |
virtual void | setLayout (Layout *layout)=0 |
Set the Layout for this appender. More... | |
const std::string & | getName () const |
Get the name of this appender. More... | |
virtual void | setThreshold (Priority::Value priority)=0 |
Set the threshold priority of this Appender. More... | |
virtual Priority::Value | getThreshold ()=0 |
Get the threshold priority of this Appender. More... | |
virtual void | setFilter (Filter *filter)=0 |
Set a Filter for this appender. More... | |
virtual Filter * | getFilter ()=0 |
Get the Filter for this appender. More... | |
Static Public Member Functions | |
static Appender * | getAppender (const std::string &name) |
Get a pointer to an exitsing Appender. More... | |
static bool | reopenAll () |
Call reopen() on all existing Appenders. More... | |
static void | closeAll () |
Call reopen() on all existing Appenders. More... | |
Protected Member Functions | |
Appender (const std::string &name) | |
Constructor for Appender. More... | |
Implement this interface for your own strategies for printing log statements.
|
protected |
Constructor for Appender.
Will only be used in getAppender() (and in derived classes of course).
name | The name of this Appender. |
|
virtual |
Destructor for Appender.
|
pure virtual |
Release any resources allocated within the appender such as file handles, network connections, etc.
Implemented in log4cpp::RemoteSyslogAppender, log4cpp::NTEventLogAppender, log4cpp::AppenderSkeleton, log4cpp::SyslogAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::Win32DebugAppender, log4cpp::StringQueueAppender, log4cpp::AbortAppender, log4cpp::OstreamAppender, and log4cpp::BufferingAppender.
|
static |
|
pure virtual |
Log in Appender specific way.
event | The LoggingEvent to log. |
Implemented in log4cpp::AppenderSkeleton.
|
static |
|
pure virtual |
Get the Filter for this appender.
Implemented in log4cpp::AppenderSkeleton.
|
inline |
Get the name of this appender.
The name identifies the appender.
|
pure virtual |
Get the threshold priority of this Appender.
Implemented in log4cpp::AppenderSkeleton.
|
pure virtual |
Reopens the output destination of this Appender, e.g.
the logfile or TCP socket.
Implemented in log4cpp::RemoteSyslogAppender, log4cpp::NTEventLogAppender, log4cpp::SyslogAppender, log4cpp::AppenderSkeleton, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::StringQueueAppender, log4cpp::AbortAppender, and log4cpp::OstreamAppender.
|
static |
|
pure virtual |
Check if the appender uses a layout.
Implemented in log4cpp::NTEventLogAppender, log4cpp::AppenderSkeleton, log4cpp::IdsaAppender, log4cpp::LayoutAppender, and log4cpp::AbortAppender.
|
pure virtual |
Set a Filter for this appender.
Implemented in log4cpp::AppenderSkeleton.
|
pure virtual |
Set the Layout for this appender.
layout | The layout to use. |
Implemented in log4cpp::NTEventLogAppender, log4cpp::AppenderSkeleton, log4cpp::IdsaAppender, log4cpp::AbortAppender, and log4cpp::LayoutAppender.
|
pure virtual |
Set the threshold priority of this Appender.
The Appender will not appender LoggingEvents with a priority lower than the threshold. Use Priority::NOTSET to disable threshold checking.
priority | The priority to set. |
Implemented in log4cpp::AppenderSkeleton.