17 INLINE std::string NotifyCategory::
18 get_fullname()
const {
25 INLINE std::string NotifyCategory::
26 get_basename()
const {
33 NotifySeverity NotifyCategory::
34 get_severity()
const {
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);
62 is_on(NotifySeverity severity)
const {
63 TAU_PROFILE(
"bool NotifyCategory::is_on(NotifySeverity) const",
" ", TAU_USER);
64 return (
int)severity >= (int)get_severity();
67 #if defined(NOTIFY_DEBUG) || defined(CPPPARSER) 71 INLINE
bool NotifyCategory::
74 return UNLIKELY(
is_on(NS_spam));
80 INLINE
bool NotifyCategory::
83 return UNLIKELY(
is_on(NS_debug));
92 return is_on(NS_info);
100 return is_on(NS_warning);
108 return is_on(NS_error);
116 return is_on(NS_fatal);
124 #if defined(NOTIFY_DEBUG) 125 return out(NS_spam, prefix);
136 #if defined(NOTIFY_DEBUG) 137 return out(NS_debug, prefix);
148 return out(NS_info, prefix);
156 return out(NS_warning, prefix);
164 return out(NS_error, prefix);
172 return out(NS_fatal, prefix);
175 INLINE std::ostream &
177 return out << cat.get_fullname();
bool is_error() const
A shorthand way to write is_on(NS_error).
std::ostream & error(bool prefix=true) const
A shorthand way to write out(NS_error).
static std::ostream & out()
A convenient way to get the ostream that should be written to for a Notify- type message.
std::ostream & spam(bool prefix=true) const
A shorthand way to write out(NS_spam).
A particular category of error messages.
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.
std::ostream & fatal(bool prefix=true) const
A shorthand way to write out(NS_fatal).
set_severity
Sets the severity level of messages that will be reported from this Category.
bool is_info() const
A shorthand way to write is_on(NS_info).
bool is_on(NotifySeverity severity) const
Returns true if messages of the indicated severity level ought to be reported for this Category.
bool is_fatal() const
A shorthand way to write is_on(NS_fatal).
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 & warning(bool prefix=true) const
A shorthand way to write out(NS_warning).
std::ostream & debug(bool prefix=true) const
A shorthand way to write out(NS_debug).