logbuf is an output-only streambuf with the ability to disable sets of messages at runtime. More...
#include <logstream.hxx>
Public Member Functions | |
logbuf () | |
Constructor. | |
~logbuf () | |
Destructor. | |
bool | enabled () |
Is logging enabled? | |
void | set_log_state (sgDebugClass c, sgDebugPriority p) |
Set the logging level of subsequent messages. | |
void | set_sb (std::streambuf *sb) |
Set the stream buffer. | |
Static Public Member Functions | |
static void | set_log_level (sgDebugClass c, sgDebugPriority p) |
Set the global logging level. | |
static void | set_log_classes (sgDebugClass c) |
Set the allowed logging classes. | |
static sgDebugClass | get_log_classes () |
Get the logging classes currently enabled. | |
static void | set_log_priority (sgDebugPriority p) |
Set the logging priority. | |
static sgDebugPriority | get_log_priority () |
Get the current logging priority. | |
Protected Member Functions | |
virtual int | sync () |
sync/flush | |
int_type | overflow (int ch) |
overflow |
logbuf is an output-only streambuf with the ability to disable sets of messages at runtime.
Only messages with priority >= logbuf::logPriority and debugClass == logbuf::logClass are output.
Definition at line 59 of file logstream.hxx.
bool logbuf::enabled | ( | ) | [inline] |
sgDebugClass logbuf::get_log_classes | ( | ) | [static] |
Get the logging classes currently enabled.
Definition at line 83 of file logstream.cxx.
sgDebugPriority logbuf::get_log_priority | ( | ) | [static] |
Get the current logging priority.
Definition at line 95 of file logstream.cxx.
void logbuf::set_log_classes | ( | sgDebugClass | c | ) | [static] |
Set the allowed logging classes.
c | All enabled logging classes anded together. |
Definition at line 77 of file logstream.cxx.
void logbuf::set_log_level | ( | sgDebugClass | c, | |
sgDebugPriority | p | |||
) | [static] |
Set the global logging level.
c | debug class | |
p | priority |
Definition at line 70 of file logstream.cxx.
void logbuf::set_log_priority | ( | sgDebugPriority | p | ) | [static] |
Set the logging priority.
c | The priority cutoff for logging messages. |
Definition at line 89 of file logstream.cxx.
void logbuf::set_log_state | ( | sgDebugClass | c, | |
sgDebugPriority | p | |||
) | [inline] |
Set the logging level of subsequent messages.
c | debug class | |
p | priority |
Definition at line 165 of file logstream.hxx.
void logbuf::set_sb | ( | std::streambuf * | sb | ) |
Set the stream buffer.
sb | stream buffer |