10#ifndef _LOG4SHIB_CATEGORY_HH
11#define _LOG4SHIB_CATEGORY_HH
68 static
Category& getInstance(const
std::
string& name);
89 static
std::vector<
Category*>* getCurrentCategories();
94 static
void shutdown();
105 virtual const
std::
string& getName() const throw();
114 virtual
void setPriority(
Priority::Value priority);
120 virtual
Priority::Value getPriority() const throw();
130 virtual
Priority::Value getChainedPriority() const throw();
138 virtual
bool isPriorityEnabled(
Priority::Value priority) const throw();
147 virtual
void addAppender(
Appender* appender);
155 virtual
void addAppender(
Appender& appender);
167 addAppender(appender);
169 removeAllAppenders();
180 addAppender(appender);
189 virtual Appender* getAppender()
const;
197 virtual Appender* getAppender(
const std::string& name)
const;
209 virtual void removeAllAppenders();
215 virtual void removeAppender(
Appender* appender);
224 return ownsAppender(getAppender());
232 virtual bool ownsAppender(
Appender* appender)
const throw();
245 virtual void callAppenders(
const LoggingEvent& event)
throw();
250 virtual void setAdditivity(
bool additivity);
255 virtual bool getAdditivity()
const throw();
262 virtual
Category* getParent() throw();
269 virtual const
Category* getParent() const throw();
278 virtual
void log(
Priority::Value priority, const
char* stringFormat,
286 virtual
void log(
Priority::Value priority,
287 const
std::
string& message) throw();
297 virtual
void logva(
Priority::Value priority,
298 const
char* stringFormat,
307 void debug(const
char* stringFormat, ...) throw();
313 void debug(const
std::
string& message) throw();
319 inline
bool isDebugEnabled() const throw() {
320 return isPriorityEnabled(Priority::DEBUG);
328 return getStream(Priority::DEBUG);
337 void info(
const char* stringFormat, ...) throw();
343 void info(const
std::
string& message) throw();
349 inline
bool isInfoEnabled() const throw() {
350 return isPriorityEnabled(Priority::INFO);
358 return getStream(Priority::INFO);
367 void notice(
const char* stringFormat, ...) throw();
373 void notice(const
std::
string& message) throw();
379 inline
bool isNoticeEnabled() const throw() {
380 return isPriorityEnabled(Priority::NOTICE);
388 return getStream(Priority::NOTICE);
397 void warn(
const char* stringFormat, ...) throw();
403 void warn(const
std::
string& message) throw();
409 inline
bool isWarnEnabled() const throw() {
410 return isPriorityEnabled(Priority::WARN);
418 return getStream(Priority::WARN);
427 void error(
const char* stringFormat, ...) throw();
433 void error(const
std::
string& message) throw();
439 inline
bool isErrorEnabled() const throw() {
440 return isPriorityEnabled(Priority::ERROR);
448 return getStream(Priority::ERROR);
457 void crit(
const char* stringFormat, ...) throw();
463 void crit(const
std::
string& message) throw();
469 inline
bool isCritEnabled() const throw() {
470 return isPriorityEnabled(Priority::CRIT);
478 return getStream(Priority::CRIT);
487 void alert(
const char* stringFormat, ...) throw();
493 void alert(const
std::
string& message) throw();
499 inline
bool isAlertEnabled() const throw() {
500 return isPriorityEnabled(Priority::ALERT);
508 return getStream(Priority::ALERT);
517 void emerg(
const char* stringFormat, ...) throw();
523 void emerg(const
std::
string& message) throw();
529 inline
bool isEmergEnabled() const throw() {
530 return isPriorityEnabled(Priority::EMERG);
538 return getStream(Priority::EMERG);
549 void fatal(
const char* stringFormat, ...) throw();
557 void fatal(const
std::
string& message) throw();
565 inline
bool isFatalEnabled() const throw() {
566 return isPriorityEnabled(Priority::FATAL);
576 return getStream(Priority::FATAL);
608 va_list arguments)
throw();
616 const std::string& message)
throw();
625 const std::string _name;
638 typedef std::map<Appender *, bool> OwnsAppenderMap;
646 virtual bool ownsAppender(
Appender* appender,
647 OwnsAppenderMap::iterator& i2)
throw();
657 OwnsAppenderMap _ownsAppender;
663 volatile bool _isAdditive;
#define LOG4SHIB_EXPORT
Definition Export.hh:11
Implement this interface for your own strategies for printing log statements.
Definition Appender.hh:33
This class enables streaming simple types and objects to a category.
Definition CategoryStream.hh:33
This is the central class in the log4j package.
Definition Category.hh:32
void setAppender(Appender &appender)
Adds an Appender for this Category.
Definition Category.hh:179
CategoryStream warnStream()
Return a CategoryStream with priority WARN.
Definition Category.hh:417
CategoryStream critStream()
Return a CategoryStream with priority CRIT.
Definition Category.hh:477
CategoryStream emergStream()
Return a CategoryStream with priority EMERG.
Definition Category.hh:537
CategoryStream debugStream()
Return a CategoryStream with priority DEBUG.
Definition Category.hh:327
CategoryStream noticeStream()
Return a CategoryStream with priority NOTICE.
Definition Category.hh:387
CategoryStream alertStream()
Return a CategoryStream with priority ALERT.
Definition Category.hh:507
CategoryStream errorStream()
Return a CategoryStream with priority ERROR.
Definition Category.hh:447
CategoryStream infoStream()
Return a CategoryStream with priority INFO.
Definition Category.hh:357
CategoryStream fatalStream()
Return a CategoryStream with priority FATAL.
Definition Category.hh:575
bool ownsAppender() const
Returns true if the Category owns the first Appender in its Appender set.
Definition Category.hh:223
HierarchyMaintainer is an internal log4shib class.
Definition HierarchyMaintainer.hh:27
The Priority class provides importance levels with which one can categorize log messages.
Definition Priority.hh:62
int Value
The type of Priority Values.
Definition Priority.hh:84
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:147
Definition Portability.hh:37
The internal representation of logging events.
Definition LoggingEvent.hh:32