17INLINE std::string NotifyCategory::
25INLINE std::string NotifyCategory::
33NotifySeverity NotifyCategory::
35 TAU_PROFILE(
"NotifyCategory NotifyCategory::get_severity() const",
" ", TAU_USER);
36 if (!is_cache_valid(_local_modified)) {
39 return _severity_cache;
48#if defined(NOTIFY_DEBUG)
52 _severity = (std::max)(severity, NS_info);
62is_on(NotifySeverity severity)
const {
63 TAU_PROFILE(
"bool NotifyCategory::is_on(NotifySeverity) const",
" ", TAU_USER);
64 return (
int)severity >= (int)get_severity();
72#if defined(NOTIFY_DEBUG) || defined(CPPPARSER)
74 return UNLIKELY(
is_on(NS_spam));
85#if defined(NOTIFY_DEBUG) || defined(CPPPARSER)
87 return UNLIKELY(
is_on(NS_debug));
98 return is_on(NS_info);
106 return is_on(NS_warning);
114 return is_on(NS_error);
122 return is_on(NS_fatal);
129spam(
bool prefix)
const {
130#if defined(NOTIFY_DEBUG)
131 return out(NS_spam, prefix);
141debug(
bool prefix)
const {
142#if defined(NOTIFY_DEBUG)
143 return out(NS_debug, prefix);
153info(
bool prefix)
const {
154 return out(NS_info, prefix);
162 return out(NS_warning, prefix);
169error(
bool prefix)
const {
170 return out(NS_error, prefix);
177fatal(
bool prefix)
const {
178 return out(NS_fatal, prefix);
183 return out << cat.get_fullname();
A particular category of error messages.
set_severity
Sets the severity level of messages that will be reported from this Category.
std::ostream & fatal(bool prefix=true) const
A shorthand way to write out(NS_fatal).
bool is_error() const
A shorthand way to write is_on(NS_error).
bool is_on(NotifySeverity severity) const
Returns true if messages of the indicated severity level ought to be reported for this Category.
bool is_spam() const
A shorthand way to write is_on(NS_spam).
std::ostream & debug(bool prefix=true) const
A shorthand way to write out(NS_debug).
std::ostream & info(bool prefix=true) const
A shorthand way to write out(NS_info).
std::ostream & out(NotifySeverity severity, bool prefix=true) const
Begins a new message to this Category at the indicated severity level.
std::ostream & spam(bool prefix=true) const
A shorthand way to write out(NS_spam).
std::ostream & warning(bool prefix=true) const
A shorthand way to write out(NS_warning).
bool is_debug() const
A shorthand way to write is_on(NS_debug).
bool is_info() const
A shorthand way to write is_on(NS_info).
std::ostream & error(bool prefix=true) const
A shorthand way to write out(NS_error).
bool is_fatal() const
A shorthand way to write is_on(NS_fatal).
bool is_warning() const
A shorthand way to write is_on(NS_warning).
static std::ostream & null()
A convenient way to get an ostream that doesn't do anything.