fgms 0.11.8
The
FlightGear MultiPlayer Server
project
logstream.hxx File Reference

Stream based logging mechanism. More...

#include <simgear/compiler.h>
#include <iostream.h>
#include <simgear/sg_traits.hxx>
#include <cstdio>
#include <simgear/debug/debug_types.h>

Go to the source code of this file.

Classes

class  logbuf
 logbuf is an output-only streambuf More...
 
struct  loglevel
 logstream manipulator for setting the log level of a message. More...
 
class  logstream
 Class to manage the debug logging stream. More...
 
struct  logstream_base
 A helper class. More...
 

Macros

#define SG_CONSOLE(C, P, M)   sglog() << loglevel((sgDebugClass) (C|SG_CONSOLE),P) << sglog().datestr() << M << "\r\n";
 
#define SG_LOG(C, P, M)   sglog() << loglevel(C,P) << sglog().datestr() << M << std::endl
 

Typedefs

typedef string(* DATEFUNC) (void)
 The user can provide a function which returns a date as a string. More...
 

Functions

 SG_USING_STD (streambuf)
 
 SG_USING_STD (ostream)
 
 SG_USING_STD (cout)
 
 SG_USING_STD (cerr)
 
 SG_USING_STD (endl)
 
 SG_USING_STD (string)
 

Variables

logstreamglobal_logstream
 

Detailed Description

Stream based logging mechanism.

Author
Bernie Bright, 1998

Definition in file logstream.hxx.

Macro Definition Documentation

#define SG_CONSOLE (   C,
  P,
 
)    sglog() << loglevel((sgDebugClass) (C|SG_CONSOLE),P) << sglog().datestr() << M << "\r\n";

Definition at line 413 of file logstream.hxx.

Referenced by logbuf::set_log_state().

Typedef Documentation

typedef string( * DATEFUNC) (void)

The user can provide a function which returns a date as a string.

Definition at line 70 of file logstream.hxx.

Function Documentation

SG_USING_STD ( streambuf  )
SG_USING_STD ( ostream  )
SG_USING_STD ( cout  )
SG_USING_STD ( cerr  )
SG_USING_STD ( endl  )
SG_USING_STD ( string  )

Variable Documentation

logstream* global_logstream

Definition at line 29 of file logstream.cxx.

Referenced by logstream::sglog().