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 void | close ()=0 |
Release any resources allocated within the appender such as file handles, network connections, etc. More... | |
virtual void | doAppend (const LoggingEvent &event) |
Log in Appender specific way. More... | |
virtual Filter * | getFilter () |
Get the Filter for this appender. More... | |
virtual Priority::Value | getThreshold () |
Get the threshold priority of this Appender. More... | |
virtual bool | reopen () |
Reopens the output destination of this Appender, e.g. More... | |
virtual bool | requiresLayout () const =0 |
Check if the appender uses a layout. More... | |
virtual void | setFilter (Filter *filter) |
Set a Filter for this appender. More... | |
virtual void | setLayout (Layout *layout)=0 |
Set the Layout for this appender. More... | |
virtual void | setThreshold (Priority::Value priority) |
Set the threshold priority of this Appender. More... | |
virtual | ~AppenderSkeleton () |
Destructor for AppenderSkeleton. More... | |
Public Member Functions inherited from Appender | |
const std::string & | getName () const |
Get the name of this appender. More... | |
virtual | ~Appender () |
Destructor for Appender. More... | |
Protected Member Functions | |
virtual void | _append (const LoggingEvent &event)=0 |
Log in Appender specific way. More... | |
AppenderSkeleton (const std::string &name) | |
Constructor for AppenderSkeleton. More... | |
Protected Member Functions inherited from Appender | |
Appender (const std::string &name) | |
Constructor for Appender. More... | |
Private Member Functions | |
AppenderSkeleton & | operator= (const AppenderSkeleton &) |
Private Attributes | |
Filter * | _filter |
Priority::Value | _threshold |
Additional Inherited Members | |
Static Public Member Functions inherited from Appender | |
static void | closeAll () |
Call reopen() on all existing Appenders. More... | |
static Appender * | getAppender (const std::string &name) |
Get a pointer to an existing Appender. More... | |
static bool | reopenAll () |
Call reopen() on all existing Appenders. More... | |
AppenderSkeleton is a helper class, simplifying implementation of Appenders: it already takes care of handling of Thresholds and Filters.
Definition at line 24 of file AppenderSkeleton.hh.
|
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 RemoteSyslogAppender, FileAppender, SyslogAppender, IdsaAppender, StringQueueAppender, AbortAppender, RollingFileAppender, OstreamAppender, and BufferingAppender.
|
pure virtual |
Release any resources allocated within the appender such as file handles, network connections, etc.
Implements Appender.
Implemented in RemoteSyslogAppender, SyslogAppender, FileAppender, IdsaAppender, StringQueueAppender, AbortAppender, OstreamAppender, and BufferingAppender.
|
virtual |
|
virtual |
|
virtual |
|
private |
|
virtual |
Reopens the output destination of this Appender, e.g.
the logfile or TCP socket.
Implements Appender.
Reimplemented in RemoteSyslogAppender, SyslogAppender, FileAppender, IdsaAppender, StringQueueAppender, AbortAppender, and OstreamAppender.
|
pure virtual |
Check if the appender uses a layout.
Implements Appender.
Implemented in IdsaAppender, LayoutAppender, and AbortAppender.
|
virtual |
|
pure virtual |
Set the Layout for this appender.
layout | The layout to use. |
Implements Appender.
Implemented in IdsaAppender, AbortAppender, and 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 Appender.
|
private |
Definition at line 107 of file AppenderSkeleton.hh.
|
private |
Definition at line 106 of file AppenderSkeleton.hh.