MercuryLog Class Reference

#include <MercuryLog.h>

Collaboration diagram for MercuryLog:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MercuryLog ()
void Warn (const MString &message, int verbosity=0)
 Warn user, put output both in info and in log.
void Log (const MString &message, int verbosity=0)
 Log message to the logfile and optionally screen.
void Info (const MString &message, int verbosity=0)
 Log message to the info file and optionally the screen.
void InfoVerbosity (int verbosity)
 Lower levels of verbosity are displayed more often.
void LogVerbosity (int verbosity)
void WarnVerbosity (int verbosity)
int InfoVerbosity () const
int LogVerbosity () const
int WarnVerbosity () const

Private Member Functions

void CheckInit ()

Private Attributes

bool m_bInitilized
bool m_bLogToDisk
bool m_bInfoToDisk
bool m_bShowLogInConsole
bool m_bShowInfoInConsole
FILE * m_fileLog
FILE * m_fileInfo
MercuryTimerm_tmrStart
volatile int m_infoVerbose
volatile int m_logVerbose
volatile int m_warnVerbose
MercuryMutex m_mutex

Detailed Description

MercuryLog - a simple and easy to use log output system. You should use this in your program rather than cout'ing things to the console. This should be thread safe.

Definition at line 13 of file MercuryLog.h.


Constructor & Destructor Documentation

MercuryLog::MercuryLog (  ) 

Definition at line 35 of file MercuryLog.cpp.


Member Function Documentation

void MercuryLog::Warn ( const MString message,
int  verbosity = 0 
)

Warn user, put output both in info and in log.

Definition at line 42 of file MercuryLog.cpp.

void MercuryLog::Log ( const MString message,
int  verbosity = 0 
)

Log message to the logfile and optionally screen.

Definition at line 56 of file MercuryLog.cpp.

void MercuryLog::Info ( const MString message,
int  verbosity = 0 
)

Log message to the info file and optionally the screen.

Definition at line 75 of file MercuryLog.cpp.

void MercuryLog::InfoVerbosity ( int  verbosity  )  [inline]

Lower levels of verbosity are displayed more often.

Definition at line 26 of file MercuryLog.h.

void MercuryLog::LogVerbosity ( int  verbosity  )  [inline]

Definition at line 27 of file MercuryLog.h.

void MercuryLog::WarnVerbosity ( int  verbosity  )  [inline]

Definition at line 28 of file MercuryLog.h.

int MercuryLog::InfoVerbosity (  )  const [inline]

Definition at line 31 of file MercuryLog.h.

int MercuryLog::LogVerbosity (  )  const [inline]

Definition at line 32 of file MercuryLog.h.

int MercuryLog::WarnVerbosity (  )  const [inline]

Definition at line 33 of file MercuryLog.h.

void MercuryLog::CheckInit (  )  [private]

Definition at line 90 of file MercuryLog.cpp.


Member Data Documentation

bool MercuryLog::m_bInitilized [private]

Definition at line 37 of file MercuryLog.h.

bool MercuryLog::m_bLogToDisk [private]

Definition at line 39 of file MercuryLog.h.

bool MercuryLog::m_bInfoToDisk [private]

Definition at line 40 of file MercuryLog.h.

bool MercuryLog::m_bShowLogInConsole [private]

Definition at line 41 of file MercuryLog.h.

bool MercuryLog::m_bShowInfoInConsole [private]

Definition at line 42 of file MercuryLog.h.

FILE* MercuryLog::m_fileLog [private]

Definition at line 44 of file MercuryLog.h.

FILE* MercuryLog::m_fileInfo [private]

Definition at line 45 of file MercuryLog.h.

MercuryTimer* MercuryLog::m_tmrStart [private]

Definition at line 47 of file MercuryLog.h.

volatile int MercuryLog::m_infoVerbose [private]

Definition at line 50 of file MercuryLog.h.

volatile int MercuryLog::m_logVerbose [private]

Definition at line 51 of file MercuryLog.h.

volatile int MercuryLog::m_warnVerbose [private]

Definition at line 52 of file MercuryLog.h.

MercuryMutex MercuryLog::m_mutex [private]

Definition at line 54 of file MercuryLog.h.


The documentation for this class was generated from the following files:
Hosted by SourceForge.net Logo