10 #ifndef _LOG4CPP_APPENDER_HH
11 #define _LOG4CPP_APPENDER_HH
19 #include <sys/types.h>
44 static Appender* getAppender(
const std::string& name);
50 static bool reopenAll();
56 static void closeAll();
108 inline const std::string&
getName()
const {
return _name; };
136 typedef std::map<std::string, Appender*> AppenderMap;
138 static AppenderMap& _getAllAppenders();
139 static void _deleteAllAppenders();
140 static void _deleteAllAppendersWOLock(std::vector<Appender*> &appenders);
141 static void _addAppender(
Appender* appender);
142 static void _removeAppender(
Appender* appender);
144 const std::string _name;
#define LOG4CPP_EXPORT
Definition: Export.hh:26
Definition: Appender.hh:155
Definition: Appender.hh:147
threading::Mutex _appenderMapMutex
Definition: Appender.hh:150
Appender::AppenderMap * _allAppenders
Definition: Appender.hh:149
Implement this interface for your own strategies for printing log statements.
Definition: Appender.hh:34
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.
virtual Filter * getFilter()=0
Get the Filter for this appender.
virtual bool reopen()=0
Reopens the output destination of this Appender, e.g.
const std::string & getName() const
Get the name of this appender.
Definition: Appender.hh:108
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.
This is the central class in the log4j package.
Definition: Category.hh:33
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:29
The top level namespace for all 'Log for C++' types and classes.
Definition: AbortAppender.hh:16
std::set< Appender * > AppenderSet
Definition: Appender.hh:165
static Appender::AppenderMapStorageInitializer appenderMapStorageInitializer
Definition: Appender.hh:164
The internal representation of logging events.
Definition: LoggingEvent.hh:32