GCpp general purpose C++ library  version 1.0
GLogMessage.hh File Reference
#include "GGlobal.hh"
#include "GBaseFunctions.hh"
#include "GStringFunctions.hh"
#include "icc/GLogMessage.icc"

Go to the source code of this file.

Classes

class  GLogMessage
 

Functions

void GSetVerboseLevel (u_int v)
 
u_int GGetVerboseLevel ()
 
void GSetLogFile (const string &fname, bool term=true)
 
void GCloseLogFile ()
 
void GLogMessage (const string &text, u_int verb=0)
 
void GLogMessage (const string &text, u_int verb, u_int ref_level)
 
void GLogInfo (const string &text)
 
void GLogWarning (const string &text)
 
void GLogError (const string &text, bool abort=true)
 
void GLogMessage (ostream &os, const string &text, u_int verb=0)
 
void GLogInfo (ostream &os, const string &text)
 
void GLogWarning (ostream &os, const string &text)
 
void GLogError (ostream &os, const string &text, bool abort=true)
 
void GDebugLine (const string &text, u_int verb=0)
 
void GDebug (const string &text, u_int verb=0)
 

Detailed Description

Include file for the GLogMessage class

Function Documentation

void GCloseLogFile ( )
inline

Close the log file (set output to standard outputs).

References GLogMessage::CloseLogFile().

void GDebugLine ( const string &  ,
u_int   
)
inline

Send a debugging line to the standard error stream, if GDEBUG variable is defined and its value is greater than or equal to the verb argument value.

u_int GGetVerboseLevel ( )
inline

Get the information verbose level.

References GLogMessage::GetVerboseLevel().

void GLogError ( const string &  text,
bool  abort 
)
inline

Send an error message (special highlighting) to the standard error stream. The program is then interrupted, except if abort is set to false. (short-cut the GLogMessage static function).

Parameters
texttext to be displayed
abortindicates if program should crash

References GLogMessage::SengLogError().

void GLogError ( ostream &  os,
const string &  text,
bool  abort 
)
inline

Send an error message (special highlighting) to an output stream. The program is then interrupted, except if abort is set to false. (short-cut the GLogMessage static function).

Parameters
osoutput stream
texttext to be displayed
abortindicates if program should crash

References GLogMessage::SengLogError().

void GLogInfo ( const string &  text)
inline

Send an information message to the standard output stream. (short-cut the GLogMessage static function).

Parameters
texttext to be displayed

References GLogMessage::SendLogInfo().

void GLogInfo ( ostream &  os,
const string &  text 
)
inline

Send an information message to an output stream. (short-cut the GLogMessage static function).

Parameters
osoutput stream
texttext to be displayed

References GLogMessage::SendLogInfo().

void GLogMessage ( const string &  text,
u_int  verb 
)
inline

Send a message to the standard output stream, if the given verbose value is lower or equal to the run manager value. (short-cut the GLogMessage static function).

Parameters
texttext to be displayed
verbrequested verbose level to display the message

References GLogMessage::SendLogMessage().

void GLogMessage ( const string &  text,
u_int  verb,
u_int  ref_level 
)
inline

Send a message to the standard output stream, if the argument verbose value is lower or equal to the external reference verbose level ref_level. This function is for use with packages that define their own verbose level. Set the verb value to 0 to display the message in any case.

Parameters
texttext to be displayed
verbrequested verbose level to display the message
ref_levelexternal reference verbose level

References GLogMessage::SendLogMessage().

void GLogMessage ( ostream &  os,
const string &  text,
u_int  verb 
)
inline

Send a message to an output stream, if the given verbose value is lower or equal to the run manager value. Set the verb value to display the message in any case. (short-cut the GLogMessage static function).

Parameters
osoutput stream
texttext to be displayed
verbrequested verbose level to display the message

References GLogMessage::SendLogMessage().

void GLogWarning ( const string &  text)
inline
void GLogWarning ( ostream &  os,
const string &  text 
)
inline

Send a warning message (special highlighting) to an output stream. (short-cut the GLogMessage static function).

Parameters
osoutput stream
texttext to be displayed

References GLogMessage::SendLogWarning().

void GSetLogFile ( const string &  fname,
bool  term 
)
inline

Indicate a log file name for simulation messages. When messages are sent to a log file, it is possible to switch off the terminal messages, if argument term is set to false. (this function is a short-cut the GLogMessage static function).

Parameters
fnamename of the log-file
termindicate if terminal output is ON/OFF (default is ON)

References GLogMessage::SetLogFile().

void GSetVerboseLevel ( u_int  v)
inline

Set the information verbose level.

Parameters
vnew verbose level

References GLogMessage::SetVerboseLevel().