#include <notifyCategory.h>
Public Member Functions | |
string | get_fullname () const |
string | get_basename () const |
NotifySeverity | get_severity () const |
void | set_severity (NotifySeverity severity) |
Sets the severity level of messages that will be reported from this Category. | |
bool | is_on (NotifySeverity severity) const |
Returns true if messages of the indicated severity level ought to be reported for this Category. | |
bool | is_info () const |
A shorthand way to write is_on(NS_info). | |
bool | is_warning () const |
A shorthand way to write is_on(NS_warning). | |
bool | is_error () const |
A shorthand way to write is_on(NS_error). | |
bool | is_fatal () const |
A shorthand way to write is_on(NS_fatal). | |
ostream & | out (NotifySeverity severity, bool prefix=true) const |
Begins a new message to this Category at the indicated severity level. | |
ostream & | spam (bool prefix=true) const |
A shorthand way to write out(NS_spam). | |
ostream & | debug (bool prefix=true) const |
A shorthand way to write out(NS_debug). | |
ostream & | info (bool prefix=true) const |
A shorthand way to write out(NS_info). | |
ostream & | warning (bool prefix=true) const |
A shorthand way to write out(NS_warning). | |
ostream & | error (bool prefix=true) const |
A shorthand way to write out(NS_error). | |
ostream & | fatal (bool prefix=true) const |
A shorthand way to write out(NS_fatal). | |
int | get_num_children () const |
Returns the number of child Categories of this particular Category. | |
NotifyCategory * | get_child (int i) const |
Returns the nth child Category of this particular Category. | |
Static Public Member Functions | |
bool | is_spam () |
When NOTIFY_DEBUG is not defined, the categories are never set to "spam" or "debug" severities, and these methods are redefined to be static to make it more obvious to the compiler. | |
bool | is_debug () |
When NOTIFY_DEBUG is not defined, the categories are never set to "spam" or "debug" severities, and these methods are redefined to be static to make it more obvious to the compiler. | |
void | set_server_delta (time_t delta) |
Sets a global delta (in seconds) between the local time and the server's time, for the purpose of synchronizing the time stamps in the log messages of the client with that of a known server. | |
Private Types | |
typedef vector< NotifyCategory * > | Children |
Private Member Functions | |
NotifyCategory (const string &fullname, const string &basename, NotifyCategory *parent) | |
Private Attributes | |
string | _fullname |
string | _basename |
NotifyCategory * | _parent |
NotifySeverity | _severity |
Children | _children |
Static Private Attributes | |
time_t | _server_delta = 0 |
Friends | |
class | Notify |
Typically there will be one of these per package, so that we can turn on or off error messages at least at a package level; further nested categories can be created within a package if a finer grain of control is required.
Definition at line 48 of file notifyCategory.h.
|
Definition at line 97 of file notifyCategory.h. |
|
Definition at line 39 of file notifyCategory.cxx. References _basename, _children, _fullname, _parent, _severity, nassertv, nout, NS_info, NS_unspecified, NULL, and Notify::string_severity(). |
|
A shorthand way to write out(NS_debug).
Definition at line 231 of file notifyCategory.I. Referenced by NotifyCategoryProxy< GetCategory >::is_error(). |
|
A shorthand way to write out(NS_error).
Definition at line 270 of file notifyCategory.I. Referenced by NotifyCategoryProxy< GetCategory >::spam(). |
|
A shorthand way to write out(NS_fatal).
Definition at line 283 of file notifyCategory.I. Referenced by NotifyCategoryProxy< GetCategory >::debug(). |
|
Definition at line 43 of file notifyCategory.I. References _severity, INLINE, and NotifySeverity. |
|
Returns the nth child Category of this particular Category.
Definition at line 166 of file notifyCategory.cxx. |
|
Definition at line 31 of file notifyCategory.I. |
|
Returns the number of child Categories of this particular Category.
Definition at line 151 of file notifyCategory.cxx. References _server_delta. |
|
Definition at line 55 of file notifyCategory.I. |
|
A shorthand way to write out(NS_info).
Definition at line 244 of file notifyCategory.I. Referenced by NotifyCategoryProxy< GetCategory >::is_fatal(). |
|
When NOTIFY_DEBUG is not defined, the categories are never set to "spam" or "debug" severities, and these methods are redefined to be static to make it more obvious to the compiler.
Definition at line 152 of file notifyCategory.I. References INLINE, is_on(), and NS_fatal. Referenced by NotifyCategoryProxy< GetCategory >::is_on(). |
|
A shorthand way to write is_on(NS_error).
Definition at line 192 of file notifyCategory.I. References INLINE, NS_warning, and out(). Referenced by NotifyCategoryProxy< GetCategory >::is_debug(). |
|
A shorthand way to write is_on(NS_fatal).
Definition at line 205 of file notifyCategory.I. References INLINE, NS_error, and out(). Referenced by NotifyCategoryProxy< GetCategory >::is_info(). |
|
A shorthand way to write is_on(NS_info).
Definition at line 166 of file notifyCategory.I. References INLINE, NS_spam, and out(). Referenced by NotifyCategoryProxy< GetCategory >::is_spam(). |
|
Returns true if messages of the indicated severity level ought to be reported for this Category.
Definition at line 87 of file notifyCategory.I. References INLINE, and NS_debug. Referenced by is_debug(), is_spam(), and set_severity(). |
|
When NOTIFY_DEBUG is not defined, the categories are never set to "spam" or "debug" severities, and these methods are redefined to be static to make it more obvious to the compiler.
Definition at line 133 of file notifyCategory.I. References INLINE, is_on(), and NS_warning. |
|
A shorthand way to write is_on(NS_warning).
Definition at line 179 of file notifyCategory.I. |
|
Begins a new message to this Category at the indicated severity level. If the indicated severity level is enabled, this writes a prefixing string to the Notify::out() stream and returns that. If the severity level is disabled, this returns Notify::null(). Definition at line 114 of file notifyCategory.cxx. Referenced by is_error(), is_fatal(), and is_info(). |
|
Sets a global delta (in seconds) between the local time and the server's time, for the purpose of synchronizing the time stamps in the log messages of the client with that of a known server.
Definition at line 186 of file notifyCategory.cxx. |
|
Sets the severity level of messages that will be reported from this Category. This allows any message of this severity level or higher. Definition at line 72 of file notifyCategory.I. |
|
A shorthand way to write out(NS_spam).
Definition at line 218 of file notifyCategory.I. |
|
A shorthand way to write out(NS_warning).
Definition at line 257 of file notifyCategory.I. Referenced by NotifyCategoryProxy< GetCategory >::out(). |
|
Definition at line 102 of file notifyCategory.h. |
|
Definition at line 94 of file notifyCategory.h. Referenced by get_fullname(), and NotifyCategory(). |
|
Definition at line 98 of file notifyCategory.h. Referenced by NotifyCategory(). |
|
Definition at line 93 of file notifyCategory.h. Referenced by NotifyCategory(). |
|
Definition at line 95 of file notifyCategory.h. Referenced by NotifyCategory(). |
|
Definition at line 29 of file notifyCategory.cxx. Referenced by get_num_children(). |
|
Definition at line 96 of file notifyCategory.h. Referenced by get_basename(), get_severity(), and NotifyCategory(). |