logbuf Class Reference

logbuf is an output-only streambuf with the ability to disable sets of messages at runtime. More...

#include <logstream.hxx>

List of all members.

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

Detailed Description

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.


Member Function Documentation

bool logbuf::enabled (  )  [inline]

Is logging enabled?

Returns:
true or false

Definition at line 73 of file logstream.hxx.

sgDebugClass logbuf::get_log_classes (  )  [static]

Get the logging classes currently enabled.

Returns:
All enabled debug logging anded together.

Definition at line 83 of file logstream.cxx.

sgDebugPriority logbuf::get_log_priority (  )  [static]

Get the current logging priority.

Returns:
The priority cutoff for logging messages.

Definition at line 95 of file logstream.cxx.

void logbuf::set_log_classes ( sgDebugClass  c  )  [static]

Set the allowed logging classes.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
c debug class
p priority

Definition at line 165 of file logstream.hxx.

void logbuf::set_sb ( std::streambuf *  sb  ) 

Set the stream buffer.

Parameters:
sb stream buffer

The documentation for this class was generated from the following files:

Generated on 23 Feb 2010 for SimGear by  doxygen 1.6.1