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();
106 virtual const
std::
string& getName() const throw();
115 virtual
void setPriority(
Priority::Value priority)
116 throw(
std::invalid_argument);
122 virtual
Priority::Value getPriority() const throw();
132 virtual
Priority::Value getChainedPriority() const throw();
140 virtual
bool isPriorityEnabled(
Priority::Value priority) const throw();
149 virtual
void addAppender(
Appender* appender)
150 throw(
std::invalid_argument);
158 virtual
void addAppender(
Appender& appender);
170 addAppender(appender);
172 removeAllAppenders();
183 addAppender(appender);
192 virtual Appender* getAppender()
const;
200 virtual Appender* getAppender(
const std::string& name)
const;
212 virtual void removeAllAppenders();
218 virtual void removeAppender(
Appender* appender);
227 return ownsAppender(getAppender());
235 virtual bool ownsAppender(
Appender* appender)
const throw();
248 virtual void callAppenders(
const LoggingEvent& event)
throw();
253 virtual void setAdditivity(
bool additivity);
258 virtual bool getAdditivity()
const throw();
265 virtual Category* getParent()
throw();
272 virtual const Category* getParent()
const throw();
290 const std::string& message)
throw();
301 const char* stringFormat,
310 void debug(
const char* stringFormat, ...)
throw();
316 void debug(
const std::string& message)
throw();
340 void info(
const char* stringFormat, ...)
throw();
346 void info(
const std::string& message)
throw();
370 void notice(
const char* stringFormat, ...)
throw();
376 void notice(
const std::string& message)
throw();
400 void warn(
const char* stringFormat, ...)
throw();
406 void warn(
const std::string& message)
throw();
430 void error(
const char* stringFormat, ...)
throw();
436 void error(
const std::string& message)
throw();
460 void crit(
const char* stringFormat, ...)
throw();
466 void crit(
const std::string& message)
throw();
490 void alert(
const char* stringFormat, ...)
throw();
496 void alert(
const std::string& message)
throw();
520 void emerg(
const char* stringFormat, ...)
throw();
526 void emerg(
const std::string& message)
throw();
552 void fatal(
const char* stringFormat, ...)
throw();
560 void fatal(
const std::string& message)
throw();
611 va_list arguments)
throw();
619 const std::string& message)
throw();
628 const std::string _name;
641 typedef std::map<Appender *, bool> OwnsAppenderMap;
649 virtual bool ownsAppender(
Appender* appender,
650 OwnsAppenderMap::iterator& i2)
throw();
660 OwnsAppenderMap _ownsAppender;
666 volatile bool _isAdditive;
671 #endif // _LOG4CPP_CATEGORY_HH CategoryStream warnStream()
Return a CategoryStream with priority WARN.
Definition: Category.hh:420
CategoryStream debugStream()
Return a CategoryStream with priority DEBUG.
Definition: Category.hh:330
Definition: Priority.hh:77
bool isFatalEnabled() const
Return true if the Category will log messages with priority FATAL.
Definition: Category.hh:568
This is the central class in the log4j package.
Definition: Category.hh:33
ostream & operator<<(ostream &os, const width &w)
Definition: Manipulator.cpp:4
bool isEmergEnabled() const
Return true if the Category will log messages with priority EMERG.
Definition: Category.hh:532
Definition: Priority.hh:70
HierarchyMaintainer is an internal log4cpp class.
Definition: HierarchyMaintainer.hh:27
Definition: Portability.hh:44
CategoryStream infoStream()
Return a CategoryStream with priority INFO.
Definition: Category.hh:360
Definition: Priority.hh:73
bool isAlertEnabled() const
Return true if the Category will log messages with priority ALERT.
Definition: Category.hh:502
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:352
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:182
CategoryStream fatalStream()
Return a CategoryStream with priority FATAL.
Definition: Category.hh:578
#define LOG4CPP_EXPORT
Definition: Export.hh:19
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:226
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:147
CategoryStream critStream()
Return a CategoryStream with priority CRIT.
Definition: Category.hh:480
CategoryStream errorStream()
Return a CategoryStream with priority ERROR.
Definition: Category.hh:450
CategoryStream noticeStream()
Return a CategoryStream with priority NOTICE.
Definition: Category.hh:390
bool isErrorEnabled() const
Return true if the Category will log messages with priority ERROR.
Definition: Category.hh:442
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:33
bool isWarnEnabled() const
Return true if the Category will log messages with priority WARN.
Definition: Category.hh:412
Definition: PThreads.hh:29
class LOG4CPP_EXPORT Category
Definition: CategoryStream.hh:23
CategoryStream alertStream()
Return a CategoryStream with priority ALERT.
Definition: Category.hh:510
bool isNoticeEnabled() const
Return true if the Category will log messages with priority NOTICE.
Definition: Category.hh:382
bool isDebugEnabled() const
Return true if the Category will log messages with priority DEBUG.
Definition: Category.hh:322
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:540
bool isCritEnabled() const
Return true if the Category will log messages with priority CRIT.
Definition: Category.hh:472