log4cpp 1.1
|
AppenderSkeleton is a helper class, simplifying implementation of Appenders: it already takes care of handling of Thresholds and Filters. More...
#include <AppenderSkeleton.hh>
Public Member Functions | |
virtual | ~AppenderSkeleton () |
Destructor for AppenderSkeleton. | |
virtual void | doAppend (const LoggingEvent &event) |
Log in Appender specific way. | |
virtual bool | reopen () |
Reopens the output destination of this Appender, e.g. | |
virtual void | close ()=0 |
Release any resources allocated within the appender such as file handles, network connections, etc. | |
virtual bool | requiresLayout () const =0 |
Check if the appender uses a layout. | |
virtual void | setLayout (Layout *layout)=0 |
Set the Layout for this appender. | |
virtual void | setThreshold (Priority::Value priority) |
Set the threshold priority of this Appender. | |
virtual Priority::Value | getThreshold () |
Get the threshold priority of this Appender. | |
virtual void | setFilter (Filter *filter) |
Set a Filter for this appender. | |
virtual Filter * | getFilter () |
Get the Filter for this appender. | |
![]() | |
virtual | ~Appender () |
Destructor for Appender. | |
const std::string & | getName () const |
Get the name of this appender. | |
Protected Member Functions | |
AppenderSkeleton (const std::string &name) | |
Constructor for AppenderSkeleton. | |
virtual void | _append (const LoggingEvent &event)=0 |
Log in Appender specific way. | |
![]() | |
Appender (const std::string &name) | |
Constructor for Appender. | |
Additional Inherited Members | |
![]() | |
static Appender * | getAppender (const std::string &name) |
Get a pointer to an exitsing Appender. | |
static bool | reopenAll () |
Call reopen() on all existing Appenders. | |
static void | closeAll () |
Call reopen() on all existing Appenders. | |
AppenderSkeleton is a helper class, simplifying implementation of Appenders: it already takes care of handling of Thresholds and Filters.
|
protected |
Constructor for AppenderSkeleton.
Will only be used in getAppender() (and in derived classes of course).
name | The name of this Appender. |
|
virtual |
Destructor for AppenderSkeleton.
|
protectedpure virtual |
Log in Appender specific way.
Subclasses of Appender should implement this method to perform actual logging.
event | The LoggingEvent to log. |
Implemented in log4cpp::AbortAppender, log4cpp::BufferingAppender, log4cpp::DailyRollingFileAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::NTEventLogAppender, log4cpp::OstreamAppender, log4cpp::RemoteSyslogAppender, log4cpp::RollingFileAppender, log4cpp::StringQueueAppender, log4cpp::SyslogAppender, and log4cpp::Win32DebugAppender.
Release any resources allocated within the appender such as file handles, network connections, etc.
Implements log4cpp::Appender.
Implemented in log4cpp::AbortAppender, log4cpp::BufferingAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::NTEventLogAppender, log4cpp::OstreamAppender, log4cpp::RemoteSyslogAppender, log4cpp::StringQueueAppender, log4cpp::SyslogAppender, and log4cpp::Win32DebugAppender.
|
virtual |
Log in Appender specific way.
event | The LoggingEvent to log. |
Implements log4cpp::Appender.
|
virtual |
Get the Filter for this appender.
Implements log4cpp::Appender.
|
virtual |
|
virtual |
Reopens the output destination of this Appender, e.g.
the logfile or TCP socket.
Implements log4cpp::Appender.
Reimplemented in log4cpp::AbortAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::NTEventLogAppender, log4cpp::OstreamAppender, log4cpp::RemoteSyslogAppender, log4cpp::StringQueueAppender, and log4cpp::SyslogAppender.
Check if the appender uses a layout.
Implements log4cpp::Appender.
Implemented in log4cpp::AbortAppender, log4cpp::IdsaAppender, log4cpp::LayoutAppender, and log4cpp::NTEventLogAppender.
Set a Filter for this appender.
Implements log4cpp::Appender.
Set the Layout for this appender.
layout | The layout to use. |
Implements log4cpp::Appender.
Implemented in log4cpp::AbortAppender, log4cpp::IdsaAppender, log4cpp::NTEventLogAppender, and log4cpp::LayoutAppender.
|
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. |
Implements log4cpp::Appender.