Web Analytics Made Easy - Statcounter
Skip to content

Class SBCLogManager#

ClassList > SBCLogManager

The class SBCLogManager is dedicated to logging events handling.

  • #include "SBCLogManager.hpp"

Public Functions#

Type Name
void addEvent (SBCLogEvent::Type eventLevel, const std::string & filename, const std::string & functionName, const std::string & lineNumber, const std::string & descriptionMessage, const std::string & uuid)
Method formatting and storing event raw data.
void addEvent (SBCLogEvent * event)
void createTimer (const std::string & name)
void display ()
Methods relative to event display.
SBCLogEventCollection * getCurrentLogEventCollection ()
Returns the SBCLogEventCollection where logging events are stored.
std::string getRootDir ()
void measurePrintTimer (const std::string & name, const std::string & filename, const std::string & functionName, const std::string & lineNumber, double thresholdSeconds=5)
void measurePrintTotalTimer (const std::string & name, const std::string & filename, const std::string & functionName, const std::string & lineNumber, double thresholdSeconds=5)
void printTimer (const std::string & name, const std::string & filename, const std::string & functionName, const std::string & lineNumber, double thresholdSeconds=5)
void reDisplay ()
Useful if one wants to display again after having changed display configuration.
void reset ()
Clean up.
void reuseTimer (const std::string & name)
void save ()
void setupRootDir (const std::string & rootDir)

Public Static Functions#

Type Name
SBCLogManager & getInstance ()
Returns the unique instance of event manager.

Public Functions Documentation#

function addEvent [1/2]#

Method formatting and storing event raw data.

void SBCLogManager::addEvent (
    SBCLogEvent::Type eventLevel,
    const std::string & filename,
    const std::string & functionName,
    const std::string & lineNumber,
    const std::string & descriptionMessage,
    const std::string & uuid
) 

Parameters:

  • eventLevel event level.
  • filename file where event occurred.
  • functionName function where event occurred.
  • lineNumber line where event occurred.
  • descriptionMessage description message of the event.
  • uuid UUID.

function addEvent [2/2]#

void SBCLogManager::addEvent (
    SBCLogEvent * event
) 

function createTimer#

void SBCLogManager::createTimer (
    const std::string & name
) 

function display#

Methods relative to event display.

void SBCLogManager::display () 

Display method.


function getCurrentLogEventCollection#

Returns the SBCLogEventCollection where logging events are stored.

SBCLogEventCollection * SBCLogManager::getCurrentLogEventCollection () 


function getRootDir#

std::string SBCLogManager::getRootDir () 

function measurePrintTimer#

void SBCLogManager::measurePrintTimer (
    const std::string & name,
    const std::string & filename,
    const std::string & functionName,
    const std::string & lineNumber,
    double thresholdSeconds=5
) 

function measurePrintTotalTimer#

void SBCLogManager::measurePrintTotalTimer (
    const std::string & name,
    const std::string & filename,
    const std::string & functionName,
    const std::string & lineNumber,
    double thresholdSeconds=5
) 

function printTimer#

void SBCLogManager::printTimer (
    const std::string & name,
    const std::string & filename,
    const std::string & functionName,
    const std::string & lineNumber,
    double thresholdSeconds=5
) 

function reDisplay#

Useful if one wants to display again after having changed display configuration.

void SBCLogManager::reDisplay () 


function reset#

Clean up.

void SBCLogManager::reset () 


function reuseTimer#

void SBCLogManager::reuseTimer (
    const std::string & name
) 

function save#

void SBCLogManager::save () 

function setupRootDir#

void SBCLogManager::setupRootDir (
    const std::string & rootDir
) 

Public Static Functions Documentation#

function getInstance#

Returns the unique instance of event manager.

static SBCLogManager & SBCLogManager::getInstance ()