#include <Appender.hh>
Public Member Functions | |
virtual void | close ()=0 |
virtual void | doAppend (const LoggingEvent &event)=0 |
virtual Filter * | getFilter ()=0 |
const std::string & | getName () const |
virtual Priority::Value | getThreshold ()=0 |
virtual bool | reopen ()=0 |
virtual bool | requiresLayout () const =0 |
virtual void | setFilter (Filter *filter)=0 |
virtual void | setLayout (Layout *layout)=0 |
virtual void | setThreshold (Priority::Value priority)=0 |
virtual | ~Appender () |
Static Public Member Functions | |
static void | closeAll () |
static Appender * | getAppender (const std::string &name) |
static bool | reopenAll () |
Protected Member Functions | |
Appender (const std::string &name) | |
Private Types | |
typedef std::map< std::string, Appender * > | AppenderMap |
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 = 0 |
static threading::Mutex | _appenderMapMutex |
Implement this interface for your own strategies for printing log statements.
Definition at line 33 of file Appender.hh.
|
private |
Definition at line 134 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. |
Definition at line 75 of file Appender.cpp.
|
virtual |
Destructor for Appender.
Definition at line 80 of file Appender.cpp.
|
staticprivate |
Definition at line 32 of file Appender.cpp.
|
staticprivate |
Definition at line 65 of file Appender.cpp.
|
staticprivate |
Definition at line 18 of file Appender.cpp.
|
staticprivate |
Definition at line 38 of file Appender.cpp.
|
pure virtual |
Release any resources allocated within the appender such as file handles, network connections, etc.
Implemented in log4cpp::RemoteSyslogAppender, log4cpp::AppenderSkeleton, log4cpp::SyslogAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::StringQueueAppender, log4cpp::AbortAppender, log4cpp::OstreamAppender, and log4cpp::BufferingAppender.
|
static |
Call reopen() on all existing Appenders.
Definition at line 57 of file Appender.cpp.
|
pure virtual |
Log in Appender specific way.
event | The LoggingEvent to log. |
Implemented in log4cpp::AppenderSkeleton.
|
static |
Get a pointer to an exitsing Appender.
name | The name of the Appender to return. |
Definition at line 25 of file Appender.cpp.
|
pure virtual |
Get the Filter for this appender.
Implemented in log4cpp::AppenderSkeleton.
|
inline |
Get the name of this appender. The name identifies the appender.
Definition at line 106 of file Appender.hh.
|
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::SyslogAppender, log4cpp::AppenderSkeleton, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::StringQueueAppender, log4cpp::AbortAppender, and log4cpp::OstreamAppender.
|
static |
Call reopen() on all existing Appenders.
Definition at line 46 of file Appender.cpp.
|
pure virtual |
Check if the appender uses a layout.
Implemented in 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::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.
|
staticprivate |
Definition at line 136 of file Appender.hh.
|
staticprivate |
Definition at line 137 of file Appender.hh.
|
private |
Definition at line 144 of file Appender.hh.