Implement this interface for your own strategies for printing log statements. More...
#include <Appender.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)=0 |
Log in Appender specific way. More... | |
virtual Filter * | getFilter ()=0 |
Get the Filter for this appender. More... | |
const std::string & | getName () const |
Get the name of this appender. More... | |
virtual Priority::Value | getThreshold ()=0 |
Get the threshold priority of this Appender. More... | |
virtual bool | reopen ()=0 |
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)=0 |
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)=0 |
Set the threshold priority of this Appender. More... | |
virtual | ~Appender () |
Destructor for Appender. More... | |
Static Public Member Functions | |
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... | |
Protected Member Functions | |
Appender (const std::string &name) | |
Constructor for Appender. More... | |
Private Types | |
typedef std::map< std::string, Appender * > | AppenderMap |
Private Member Functions | |
Appender & | operator= (const Appender &) |
Static Private Member Functions | |
static void | _addAppender (Appender *appender) |
static void | _deleteAllAppenders () |
static AppenderMap & | _getAllAppenders () |
static void | _removeAppender (Appender *appender) |
Private Attributes | |
const std::string | _name |
Static Private Attributes | |
static AppenderMap * | _allAppenders |
static threading::Mutex | _appenderMapMutex |
Friends | |
class | HierarchyMaintainer |
Implement this interface for your own strategies for printing log statements.
Definition at line 33 of file Appender.hh.
|
private |
Definition at line 137 of file Appender.hh.
|
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.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
pure virtual |
Release any resources allocated within the appender such as file handles, network connections, etc.
Implemented in RemoteSyslogAppender, AppenderSkeleton, SyslogAppender, FileAppender, IdsaAppender, StringQueueAppender, AbortAppender, OstreamAppender, and BufferingAppender.
|
static |
|
pure virtual |
Log in Appender specific way.
event | The LoggingEvent to log. |
Implemented in AppenderSkeleton.
|
static |
|
pure virtual |
Get the Filter for this appender.
Implemented in AppenderSkeleton.
|
inline |
Get the name of this appender.
The name identifies the appender.
Definition at line 109 of file Appender.hh.
|
pure virtual |
|
pure virtual |
Reopens the output destination of this Appender, e.g.
the logfile or TCP socket.
Implemented in RemoteSyslogAppender, SyslogAppender, AppenderSkeleton, FileAppender, IdsaAppender, StringQueueAppender, AbortAppender, and OstreamAppender.
|
static |
|
pure virtual |
Check if the appender uses a layout.
Implemented in AppenderSkeleton, IdsaAppender, LayoutAppender, and AbortAppender.
|
pure virtual |
Set a Filter for this appender.
Implemented in AppenderSkeleton.
|
pure virtual |
Set the Layout for this appender.
layout | The layout to use. |
Implemented in AppenderSkeleton, IdsaAppender, AbortAppender, and 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 AppenderSkeleton.
|
friend |
Definition at line 37 of file Appender.hh.
|
staticprivate |
Definition at line 139 of file Appender.hh.
|
staticprivate |
Definition at line 140 of file Appender.hh.
|
private |
Definition at line 147 of file Appender.hh.