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)
122 throw(
std::invalid_argument);
128 virtual
Priority::Value getPriority() const throw();
138 virtual
Priority::Value getChainedPriority() const throw();
146 virtual
bool isPriorityEnabled(
Priority::Value priority) const throw();
155 virtual
void addAppender(
Appender* appender)
156 throw(
std::invalid_argument);
164 virtual
void addAppender(
Appender& appender);
176 addAppender(appender);
178 removeAllAppenders();
189 addAppender(appender);
198 virtual Appender* getAppender()
const;
206 virtual Appender* getAppender(
const std::string& name)
const;
218 virtual void removeAllAppenders();
224 virtual void removeAppender(
Appender* appender);
233 return ownsAppender(getAppender());
241 virtual bool ownsAppender(
Appender* appender)
const throw();
254 virtual void callAppenders(
const LoggingEvent& event)
throw();
259 virtual void setAdditivity(
bool additivity);
264 virtual bool getAdditivity()
const throw();
271 virtual
Category* getParent() throw();
278 virtual const
Category* getParent() const throw();
287 virtual
void log(
Priority::Value priority, const
char* stringFormat,
295 virtual
void log(
Priority::Value priority,
296 const
std::
string& message) throw();
306 virtual
void logva(
Priority::Value priority,
307 const
char* stringFormat,
316 void debug(const
char* stringFormat, ...) throw();
322 void debug(const
std::
string& message) throw();
328 inline
bool isDebugEnabled() const throw() {
346 void info(
const char* stringFormat, ...) throw();
352 void info(const
std::
string& message) throw();
358 inline
bool isInfoEnabled() const throw() {
376 void notice(
const char* stringFormat, ...) throw();
382 void notice(const
std::
string& message) throw();
388 inline
bool isNoticeEnabled() const throw() {
406 void warn(
const char* stringFormat, ...) throw();
412 void warn(const
std::
string& message) throw();
418 inline
bool isWarnEnabled() const throw() {
436 void error(
const char* stringFormat, ...) throw();
442 void error(const
std::
string& message) throw();
448 inline
bool isErrorEnabled() const throw() {
466 void crit(
const char* stringFormat, ...) throw();
472 void crit(const
std::
string& message) throw();
478 inline
bool isCritEnabled() const throw() {
496 void alert(
const char* stringFormat, ...) throw();
502 void alert(const
std::
string& message) throw();
508 inline
bool isAlertEnabled() const throw() {
526 void emerg(
const char* stringFormat, ...) throw();
532 void emerg(const
std::
string& message) throw();
538 inline
bool isEmergEnabled() const throw() {
558 void fatal(
const char* stringFormat, ...) throw();
566 void fatal(const
std::
string& message) throw();
574 inline
bool isFatalEnabled() const throw() {
617 va_list arguments)
throw();
625 const std::string& message)
throw();
634 const std::string _name;
647 typedef std::map<Appender *, bool> OwnsAppenderMap;
655 virtual bool ownsAppender(
Appender* appender,
656 OwnsAppenderMap::iterator& i2)
throw();
666 OwnsAppenderMap _ownsAppender;
672 volatile bool _isAdditive;
677 #endif // _LOG4CPP_CATEGORY_HH CategoryStream warnStream()
Return a CategoryStream with priority WARN.
Definition: Category.hh:426
CategoryStream debugStream()
Return a CategoryStream with priority DEBUG.
Definition: Category.hh:336
Definition: Priority.hh:77
This is the central class in the log4j package.
Definition: Category.hh:33
ostream & operator<<(ostream &os, const width &w)
Definition: Manipulator.cpp:10
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:366
Definition: Priority.hh:73
Definition: Priority.hh:71
Definition: Priority.hh:72
Definition: Priority.hh:79
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:188
CategoryStream fatalStream()
Return a CategoryStream with priority FATAL.
Definition: Category.hh:584
#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:232
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:486
CategoryStream errorStream()
Return a CategoryStream with priority ERROR.
Definition: Category.hh:456
CategoryStream noticeStream()
Return a CategoryStream with priority NOTICE.
Definition: Category.hh:396
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
Definition: PThreads.hh:29
class LOG4CPP_EXPORT Category
Definition: CategoryStream.hh:23
CategoryStream alertStream()
Return a CategoryStream with priority ALERT.
Definition: Category.hh:516
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:546