logstream Class Reference

Class to manage the debug logging stream. More...

#include <logstream.hxx>

Inheritance diagram for logstream:

logstream_base List of all members.

Public Member Functions

 logstream (ostream &out)
 The default is to send messages to cerr.
void set_output (ostream &out)
 Set the output stream.
void setLogLevels (sgDebugClass c, sgDebugPriority p)
 Set the global log class and priority level.
ostream & operator<< (const loglevel &l)
 Output operator to capture the debug level and priority of a message.

Related Functions

(Note that these are not member functions.)

logstreamsglog ()
 Return the one and only logstream instance.

Detailed Description

Class to manage the debug logging stream.

Definition at line 241 of file logstream.hxx.


Constructor & Destructor Documentation

logstream::logstream ( ostream &  out  )  [inline]

The default is to send messages to cerr.

Parameters:
out output stream

Definition at line 248 of file logstream.hxx.

References logstream_base::lbuf, and logbuf::set_sb().


Member Function Documentation

void logstream::set_output ( ostream &  out  )  [inline]

Set the output stream.

Parameters:
out output stream

Definition at line 257 of file logstream.hxx.

References logstream_base::lbuf, and logbuf::set_sb().

void logstream::setLogLevels ( sgDebugClass  c,
sgDebugPriority  p 
)

Set the global log class and priority level.

Parameters:
c debug class
p priority

Definition at line 88 of file logstream.cxx.

References logbuf::set_log_level().

ostream & logstream::operator<< ( const loglevel l  )  [inline]

Output operator to capture the debug level and priority of a message.

Parameters:
l log level

Definition at line 274 of file logstream.hxx.

References logstream_base::lbuf, loglevel::logClass, loglevel::logPriority, and logbuf::set_log_state().


Friends And Related Function Documentation

logstream & sglog (  )  [related]

Return the one and only logstream instance.

We use a function instead of a global object so we are assured that cerr has been initialised.

Returns:
current logstream

Definition at line 290 of file logstream.hxx.


The documentation for this class was generated from the following files:
Generated on Mon Dec 17 09:30:56 2007 for SimGear by  doxygen 1.5.1