10 #ifndef _LOG4CPP_CATEGORY_HH 11 #define _LOG4CPP_CATEGORY_HH 19 #include <log4cpp/convenience.h> 69 static
Category& getInstance(const
std::
string& name);
90 static
std::vector<
Category*>* getCurrentCategories();
95 static
void shutdown();
101 static
void shutdownForced();
112 virtual const
std::
string& getName() const throw();
121 virtual
void setPriority(
Priority::Value priority);
127 virtual
Priority::Value getPriority() const throw();
137 virtual
Priority::Value getChainedPriority() const throw();
145 virtual
bool isPriorityEnabled(
Priority::Value priority) const throw();
154 virtual
void addAppender(
Appender* appender);
162 virtual
void addAppender(
Appender& appender);
174 addAppender(appender);
176 removeAllAppenders();
187 addAppender(appender);
196 virtual Appender* getAppender()
const;
204 virtual Appender* getAppender(
const std::string& name)
const;
216 virtual void removeAllAppenders();
222 virtual void removeAppender(
Appender* appender);
231 return ownsAppender(getAppender());
239 virtual bool ownsAppender(
Appender* appender)
const throw();
252 virtual void callAppenders(
const LoggingEvent& event)
throw();
257 virtual void setAdditivity(
bool additivity);
262 virtual bool getAdditivity()
const throw();
269 virtual Category* getParent()
throw();
276 virtual const Category* getParent()
const throw();
294 const std::string& message)
throw();
305 const char* stringFormat,
314 void debug(
const char* stringFormat, ...)
throw();
320 void debug(
const std::string& message)
throw();
344 void info(
const char* stringFormat, ...)
throw();
350 void info(
const std::string& message)
throw();
374 void notice(
const char* stringFormat, ...)
throw();
380 void notice(
const std::string& message)
throw();
404 void warn(
const char* stringFormat, ...)
throw();
410 void warn(
const std::string& message)
throw();
434 void error(
const char* stringFormat, ...)
throw();
440 void error(
const std::string& message)
throw();
464 void crit(
const char* stringFormat, ...)
throw();
470 void crit(
const std::string& message)
throw();
494 void alert(
const char* stringFormat, ...)
throw();
500 void alert(
const std::string& message)
throw();
524 void emerg(
const char* stringFormat, ...)
throw();
530 void emerg(
const std::string& message)
throw();
556 void fatal(
const char* stringFormat, ...)
throw();
564 void fatal(
const std::string& message)
throw();
615 va_list arguments)
throw();
623 const std::string& message)
throw();
632 const std::string _name;
645 typedef std::map<Appender *, bool> OwnsAppenderMap;
653 virtual bool ownsAppender(
Appender* appender,
654 OwnsAppenderMap::iterator& i2)
throw();
664 OwnsAppenderMap _ownsAppender;
670 volatile bool _isAdditive;
675 #endif // _LOG4CPP_CATEGORY_HH CategoryStream warnStream()
Return a CategoryStream with priority WARN.
Definition: Category.hh:424
CategoryStream debugStream()
Return a CategoryStream with priority DEBUG.
Definition: Category.hh:334
Definition: Priority.hh:77
bool isFatalEnabled() const
Return true if the Category will log messages with priority FATAL.
Definition: Category.hh:572
This is the central class in the log4j package.
Definition: Category.hh:33
ostream & operator<<(ostream &os, const width &w)
Definition: Manipulator.cpp:10
bool isEmergEnabled() const
Return true if the Category will log messages with priority EMERG.
Definition: Category.hh:536
Definition: Priority.hh:70
HierarchyMaintainer is an internal log4cpp class.
Definition: HierarchyMaintainer.hh:27
Definition: Portability.hh:59
CategoryStream infoStream()
Return a CategoryStream with priority INFO.
Definition: Category.hh:364
Definition: Priority.hh:73
bool isAlertEnabled() const
Return true if the Category will log messages with priority ALERT.
Definition: Category.hh:506
Definition: Priority.hh:71
Definition: Priority.hh:72
Definition: Priority.hh:79
bool isInfoEnabled() const
Return true if the Category will log messages with priority INFO.
Definition: Category.hh:356
This class enables streaming simple types and objects to a category.
Definition: CategoryStream.hh:39
void setAppender(Appender &appender)
Adds an Appender for this Category.
Definition: Category.hh:186
CategoryStream fatalStream()
Return a CategoryStream with priority FATAL.
Definition: Category.hh:582
#define LOG4CPP_EXPORT
Definition: Export.hh:26
The top level namespace for all 'Log for C++' types and classes.
Definition: AbortAppender.hh:16
virtual bool ownsAppender() const
Returns true if the Category owns the first Appender in its Appender set.
Definition: Category.hh:230
The internal representation of logging events.
Definition: LoggingEvent.hh:32
int Value
The type of Priority Values.
Definition: Priority.hh:85
std::set< Appender * > AppenderSet
Definition: Appender.hh:165
CategoryStream critStream()
Return a CategoryStream with priority CRIT.
Definition: Category.hh:484
CategoryStream errorStream()
Return a CategoryStream with priority ERROR.
Definition: Category.hh:454
CategoryStream noticeStream()
Return a CategoryStream with priority NOTICE.
Definition: Category.hh:394
bool isErrorEnabled() const
Return true if the Category will log messages with priority ERROR.
Definition: Category.hh:446
The Priority class provides importance levels with which one can categorize log messages.
Definition: Priority.hh:61
Implement this interface for your own strategies for printing log statements.
Definition: Appender.hh:34
bool isWarnEnabled() const
Return true if the Category will log messages with priority WARN.
Definition: Category.hh:416
Definition: PThreads.hh:29
class LOG4CPP_EXPORT Category
Definition: CategoryStream.hh:23
CategoryStream alertStream()
Return a CategoryStream with priority ALERT.
Definition: Category.hh:514
bool isNoticeEnabled() const
Return true if the Category will log messages with priority NOTICE.
Definition: Category.hh:386
bool isDebugEnabled() const
Return true if the Category will log messages with priority DEBUG.
Definition: Category.hh:326
Definition: Priority.hh:78
Definition: Priority.hh:74
Definition: Priority.hh:75
Definition: Priority.hh:76
CategoryStream emergStream()
Return a CategoryStream with priority EMERG.
Definition: Category.hh:544
bool isCritEnabled() const
Return true if the Category will log messages with priority CRIT.
Definition: Category.hh:476