10 #ifndef _LOG4CPP_CATEGORY_HH
11 #define _LOG4CPP_CATEGORY_HH
19 #include <log4cpp/convenience.h>
69 static
Category& getInstance(const std::
string& name);
76 static
Category* exists(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();
281 virtual
void log(
Priority::Value priority, const
char* stringFormat,
289 virtual
void log(
Priority::Value priority,
290 const std::
string& message) throw();
300 virtual
void logva(
Priority::Value priority,
301 const
char* stringFormat,
310 void debug(const
char* stringFormat, ...) throw();
316 void debug(const std::
string& message) throw();
322 inline
bool isDebugEnabled() const throw() {
340 void info(
const char* stringFormat, ...) throw();
346 void info(const std::
string& message) throw();
352 inline
bool isInfoEnabled() const throw() {
370 void notice(
const char* stringFormat, ...) throw();
376 void notice(const std::
string& message) throw();
382 inline
bool isNoticeEnabled() const throw() {
400 void warn(
const char* stringFormat, ...) throw();
406 void warn(const std::
string& message) throw();
412 inline
bool isWarnEnabled() const throw() {
430 void error(
const char* stringFormat, ...) throw();
436 void error(const std::
string& message) throw();
442 inline
bool isErrorEnabled() const throw() {
460 void crit(
const char* stringFormat, ...) throw();
466 void crit(const std::
string& message) throw();
472 inline
bool isCritEnabled() const throw() {
490 void alert(
const char* stringFormat, ...) throw();
496 void alert(const std::
string& message) throw();
502 inline
bool isAlertEnabled() const throw() {
520 void emerg(
const char* stringFormat, ...) throw();
526 void emerg(const std::
string& message) throw();
532 inline
bool isEmergEnabled() const throw() {
552 void fatal(
const char* stringFormat, ...) throw();
560 void fatal(const std::
string& message) throw();
568 inline
bool isFatalEnabled() const 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