Classes Files

Wombat::MamaLogFile

More…

#include <MamaLogFile.h>

Public Functions

  Name
void setMaxSize(unsigned long newMax)
void setNumBackups(unsigned int newNum)
void setAppendMode(bool append)
void enableLogging(const char * file, MamaLogLevel level)
void disableLogging(void )
bool loggingToFile(void )
void rollFiles()

Detailed Description

class Wombat::MamaLogFile;

See: MamaLogFile

The [MamaLogFile](classWombat_1_1MamaLogFile.html) class provides a single interface for the configuration and control of [Mama](classWombat_1_1Mama.html) logging activity. The [MamaLogFile](classWombat_1_1MamaLogFile.html) class expands upon the existing logging capabilities of [Mama](classWombat_1_1Mama.html) providing the ability to set log file size and configure the number of log files maintained.

Public Functions Documentation

function setMaxSize

static void setMaxSize(
    unsigned long newMax
)

Parameters:

  • newMax log file size.

Set the Size of the log files. Has no effect if log file is not successfully created via a call to MamaLogFile::enableLogging(…).

function setNumBackups

static void setNumBackups(
    unsigned int newNum
)

Parameters:

  • newNum number of log files to be maintained.

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(…).

function setAppendMode

static void setAppendMode(
    bool append
)

Parameters:

  • append append mode (on or off)

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

function enableLogging

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

Parameters:

  • file log file name
  • level mama log level

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.

function disableLogging

static void disableLogging(
    void 
)

Disable logging.

function loggingToFile

static bool loggingToFile(
    void 
)

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

function rollFiles

static void rollFiles()

Perform a log file rolling.


Updated on 2023-03-31 at 15:29:25 +0100