OpenMAMA C++ API
Wombat::MamaLogFile Class Reference

The MamaLogFile class provides a single interface for the configuration and control of Mama logging activity. More...

#include <MamaLogFile.h>

Static Public Member Functions

static void setMaxSize (unsigned long newMax)
 Set the Size of the log files. More...
 
static void setNumBackups (unsigned int newNum)
 Set the number of log files to be maintained. More...
 
static void setAppendMode (bool append)
 Set the open method for the logfile. More...
 
static void enableLogging (const char *file, MamaLogLevel level)
 Enable logging. More...
 
static void disableLogging (void)
 Disable logging. More...
 
static bool loggingToFile (void)
 Return true if currently logging to file (via MamaLogFile). More...
 
static void rollFiles ()
 Perform a log file rolling. More...
 

Detailed Description

The MamaLogFile class provides a single interface for the configuration and control of Mama logging activity.

The MamaLogFile class expands upon the existing logging capabilities of Mama providing the ability to set log file size and configure the number of log files maintained.

See also
MamaLogFile

Member Function Documentation

§ setMaxSize()

static void Wombat::MamaLogFile::setMaxSize ( unsigned long  newMax)
static

Set the Size of the log files.

Has no effect if log file is not successfully created via a call to MamaLogFile::enableLogging(...).

Parameters
newMaxlog file size.

§ setNumBackups()

static void Wombat::MamaLogFile::setNumBackups ( unsigned int  newNum)
static

Set the number of log files to be maintained.

Has no effect if log file is not successfully created via a call to MamaLogFile::enableLogging(...).

Parameters
newNumnumber of log files to be maintained.

§ setAppendMode()

static void Wombat::MamaLogFile::setAppendMode ( bool  append)
static

Set the open method for the logfile.

'true' will keep any existing data in the file 'false' will overwrite any existing data in the file

Parameters
appendappend mode (on or off)

§ enableLogging()

static void Wombat::MamaLogFile::enableLogging ( const char *  file,
MamaLogLevel  level 
)
static

Enable logging.

Will set log level and attempt to open a file of the named provided. If a file could not be created or parameter file is NULL mama log output is re-directed to stderr.

Parameters
filelog file name
levelmama log level

§ disableLogging()

static void Wombat::MamaLogFile::disableLogging ( void  )
static

Disable logging.

§ loggingToFile()

static bool Wombat::MamaLogFile::loggingToFile ( void  )
static

Return true if currently logging to file (via MamaLogFile).

Return false if not logging to file (via MamaLogFile).

§ rollFiles()

static void Wombat::MamaLogFile::rollFiles ( )
static

Perform a log file rolling.