10#ifndef _LOG4CPP_APPENDER_HH
11#define _LOG4CPP_APPENDER_HH
138 typedef std::map<std::string, Appender*> AppenderMap;
140 static AppenderMap& _getAllAppenders();
141 static void _deleteAllAppenders();
142 static void _deleteAllAppendersWOLock(std::vector<Appender*>& appenders);
143 static void _addAppender(
Appender* appender);
144 static void _removeAppender(
Appender* appender);
146 const std::string _name;
#define LOG4CPP_EXPORT
Definition Export.hh:26
Definition Appender.hh:163
AppenderMapStorageInitializer()
Definition Appender.cpp:29
Definition Appender.hh:149
threading::Mutex _appenderMapMutex
mutex protecting map from multiple thread access
Definition Appender.hh:158
Appender::AppenderMap * _allAppenders
single shared instance, nifty-counter defensed
Definition Appender.hh:154
AppenderMapStorage()
Definition Appender.cpp:21
friend class Category
Definition Appender.hh:35
virtual void close()=0
Release any resources allocated within the appender such as file handles, network connections,...
virtual void setLayout(Layout *layout)=0
Set the Layout for this appender.
virtual void setFilter(Filter *filter)=0
Set a Filter for this appender.
virtual bool requiresLayout() const =0
Check if the appender uses a layout.
virtual Priority::Value getThreshold()=0
Get the threshold priority of this Appender.
const std::string & getName() const
Get the name of this appender.
Definition Appender.hh:108
virtual bool reopen()=0
Reopens the output destination of this Appender, e.g.
static void closeAll()
Call reopen() on all existing Appenders.
Definition Appender.cpp:83
static bool reopenAll()
Call reopen() on all existing Appenders.
Definition Appender.cpp:72
static Appender * getAppender(const std::string &name)
Get a pointer to an exitsing Appender.
Definition Appender.cpp:53
Appender(const std::string &name)
Constructor for Appender.
Definition Appender.cpp:118
virtual Filter * getFilter()=0
Get the Filter for this appender.
virtual void doAppend(const LoggingEvent &event)=0
Log in Appender specific way.
virtual void setThreshold(Priority::Value priority)=0
Set the threshold priority of this Appender.
Users should extend this class to implement customized logging event filtering.
Definition Filter.hh:49
Extend this abstract class to create your own log layout format.
Definition Layout.hh:22
int Value
The type of Priority Values.
Definition Priority.hh:85
Definition PThreads.hh:28
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16
static Appender::AppenderMapStorageInitializer appenderMapStorageInitializer
static initializer for every translation unit
Definition Appender.hh:176
std::set< Appender * > AppenderSet
Definition Appender.hh:177
The internal representation of logging events.
Definition LoggingEvent.hh:32