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)
115 throw(
std::invalid_argument);
121 virtual
Priority::Value getPriority() const throw();
131 virtual
Priority::Value getChainedPriority() const throw();
139 virtual
bool isPriorityEnabled(
Priority::Value priority) const throw();
148 virtual
void addAppender(
Appender* appender)
149 throw(
std::invalid_argument);
157 virtual
void addAppender(
Appender& appender);
169 addAppender(appender);
171 removeAllAppenders();
182 addAppender(appender);
191 virtual Appender* getAppender()
const;
199 virtual Appender* getAppender(
const std::string& name)
const;
211 virtual void removeAllAppenders();
217 virtual void removeAppender(
Appender* appender);
226 return ownsAppender(getAppender());
234 virtual bool ownsAppender(
Appender* appender)
const throw();
247 virtual void callAppenders(
const LoggingEvent& event)
throw();
252 virtual void setAdditivity(
bool additivity);
257 virtual bool getAdditivity()
const throw();
264 virtual Category* getParent()
throw();
271 virtual const Category* getParent()
const throw();
289 const std::string& message)
throw();
300 const char* stringFormat,
309 void debug(
const char* stringFormat, ...)
throw();
315 void debug(
const std::string& message)
throw();
339 void info(
const char* stringFormat, ...)
throw();
345 void info(
const std::string& message)
throw();
369 void notice(
const char* stringFormat, ...)
throw();
375 void notice(
const std::string& message)
throw();
399 void warn(
const char* stringFormat, ...)
throw();
405 void warn(
const std::string& message)
throw();
429 void error(
const char* stringFormat, ...)
throw();
435 void error(
const std::string& message)
throw();
459 void crit(
const char* stringFormat, ...)
throw();
465 void crit(
const std::string& message)
throw();
489 void alert(
const char* stringFormat, ...)
throw();
495 void alert(
const std::string& message)
throw();
519 void emerg(
const char* stringFormat, ...)
throw();
525 void emerg(
const std::string& message)
throw();
551 void fatal(
const char* stringFormat, ...)
throw();
559 void fatal(
const std::string& message)
throw();
610 va_list arguments)
throw();
618 const std::string& message)
throw();
627 const std::string _name;
640 typedef std::map<Appender *, bool> OwnsAppenderMap;
648 virtual bool ownsAppender(
Appender* appender,
649 OwnsAppenderMap::iterator& i2)
throw();
659 OwnsAppenderMap _ownsAppender;
665 volatile bool _isAdditive;
670 #endif // _LOG4SHIB_CATEGORY_HH This class enables streaming simple types and objects to a category.
Definition: CategoryStream.hh:33
Definition: Priority.hh:72
Definition: Priority.hh:75
bool ownsAppender() const
Returns true if the Category owns the first Appender in its Appender set.
Definition: Category.hh:225
std::set< Appender * > AppenderSet
Definition: Appender.hh:147
CategoryStream errorStream()
Return a CategoryStream with priority ERROR.
Definition: Category.hh:449
The internal representation of logging events.
Definition: LoggingEvent.hh:32
Definition: Priority.hh:74
Definition: Priority.hh:73
CategoryStream warnStream()
Return a CategoryStream with priority WARN.
Definition: Category.hh:419
bool isNoticeEnabled() const
Return true if the Category will log messages with priority NOTICE.
Definition: Category.hh:381
Definition: Priority.hh:77
Definition: Portability.hh:37
Definition: Priority.hh:78
Implement this interface for your own strategies for printing log statements.
Definition: Appender.hh:33
Definition: Priority.hh:69
bool isCritEnabled() const
Return true if the Category will log messages with priority CRIT.
Definition: Category.hh:471
#define LOG4SHIB_EXPORT
Definition: Export.hh:11
CategoryStream critStream()
Return a CategoryStream with priority CRIT.
Definition: Category.hh:479
bool isWarnEnabled() const
Return true if the Category will log messages with priority WARN.
Definition: Category.hh:411
bool isAlertEnabled() const
Return true if the Category will log messages with priority ALERT.
Definition: Category.hh:501
CategoryStream noticeStream()
Return a CategoryStream with priority NOTICE.
Definition: Category.hh:389
bool isInfoEnabled() const
Return true if the Category will log messages with priority INFO.
Definition: Category.hh:351
The Priority class provides importance levels with which one can categorize log messages.
Definition: Priority.hh:62
Definition: Priority.hh:71
int Value
The type of Priority Values.
Definition: Priority.hh:84
Definition: Priority.hh:76
The top level namespace for all 'Log for C++' types and classes.
Definition: AbortAppender.hh:16
CategoryStream debugStream()
Return a CategoryStream with priority DEBUG.
Definition: Category.hh:329
HierarchyMaintainer is an internal log4shib class.
Definition: HierarchyMaintainer.hh:27
Definition: PThreads.hh:29
This is the central class in the log4j package.
Definition: Category.hh:32
CategoryStream fatalStream()
Return a CategoryStream with priority FATAL.
Definition: Category.hh:577
Definition: Priority.hh:70
void setAppender(Appender &appender)
Adds an Appender for this Category.
Definition: Category.hh:181
bool isErrorEnabled() const
Return true if the Category will log messages with priority ERROR.
Definition: Category.hh:441
bool isDebugEnabled() const
Return true if the Category will log messages with priority DEBUG.
Definition: Category.hh:321
CategoryStream alertStream()
Return a CategoryStream with priority ALERT.
Definition: Category.hh:509
CategoryStream emergStream()
Return a CategoryStream with priority EMERG.
Definition: Category.hh:539
class LOG4SHIB_EXPORT Category
Definition: CategoryStream.hh:21
CategoryStream infoStream()
Return a CategoryStream with priority INFO.
Definition: Category.hh:359
bool isFatalEnabled() const
Return true if the Category will log messages with priority FATAL.
Definition: Category.hh:567
bool isEmergEnabled() const
Return true if the Category will log messages with priority EMERG.
Definition: Category.hh:531