Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

logbuf Class Reference

An output-only, category-based log stream. More...

#include <LogStream.h>

List of all members.

Public Methods

 logbuf ()
 Constructor.

 ~logbuf ()
 Destructor.

bool enabled ()
 Is logging enabled?

void set_log_state (int c, int p)
 Set the logging level of subsequent messages.

void set_log_level (int c, int p)
 Set the global logging level.

void set_log_classes (int c)
 Set the allowed logging classes.

int get_log_classes ()
 Get the logging classes currently enabled.

void set_log_priority (int p)
 Set the logging priority.

int get_log_priority ()
 Get the current logging priority.

void set_sb (std::streambuf *sb)
 Set the stream buffer.


Protected Methods

virtual int sync ()
 sync/flush

int overflow (int ch)
 overflow


Detailed Description

An output-only, category-based log stream.

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.


Constructor & Destructor Documentation

NAMESPACE_SIMDATA logbuf::logbuf  
 

Constructor.

logbuf::~logbuf  
 

Destructor.


Member Function Documentation

bool logbuf::enabled   [inline]
 

Is logging enabled?

Returns:
true or false

int logbuf::get_log_classes  
 

Get the logging classes currently enabled.

Returns:
All enabled debug logging anded together.

int logbuf::get_log_priority  
 

Get the current logging priority.

Returns:
The priority cutoff for logging messages.

int logbuf::overflow int    ch [inline, protected]
 

overflow

void logbuf::set_log_classes int    c
 

Set the allowed logging classes.

Parameters:
c  All enabled logging classes anded together.

void logbuf::set_log_level int    c,
int    p
 

Set the global logging level.

Parameters:
c  debug class
p  priority

void logbuf::set_log_priority int    p
 

Set the logging priority.

Parameters:
p  The priority cutoff for logging messages.

void logbuf::set_log_state int    c,
int    p
[inline]
 

Set the logging level of subsequent messages.

Parameters:
c  debug class
p  priority

void logbuf::set_sb std::streambuf *    sb
 

Set the stream buffer.

Parameters:
sb  stream buffer

int logbuf::sync   [inline, protected, virtual]
 

sync/flush


The documentation for this class was generated from the following files:
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:41 2003, using Doxygen 1.2.18.

[SF.net]