Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ISM::LogHelper Class Reference

#include <LogHelper.hpp>

Public Member Functions

 LogHelper (path logFilePath, LogLevel level)
 

Static Public Member Functions

static void close ()
 
static void displayProgress (double progress)
 
static LogHelperPtr getInstance ()
 
static void init (path logFilePath, LogLevel level)
 
static void logLine (LogLevel logLevel=LOG_INFO)
 
static void logMessage (const std::string &message, LogLevel logLevel=LOG_INFO, const char *logColor=LOG_COLOR_DEFAULT)
 

Static Public Attributes

static const char * LOG_COLOR_BLUE = "\033[34;1m"
 
static const char * LOG_COLOR_DEFAULT = "\033[0m"
 
static const char * LOG_COLOR_GREEN = "\033[32m"
 
static const char * LOG_COLOR_MAGENTA = "\033[35m"
 
static const char * LOG_COLOR_RED = "\033[31m"
 
static const char * LOG_COLOR_YELLOW = "\033[33m"
 

Private Member Functions

std::string getLogLevelString (LogLevel level)
 
std::string getTimeString ()
 
void log (const std::string &message, LogLevel logLevel=LOG_INFO, const char *logColor=LOG_COLOR_DEFAULT)
 
 LogHelper (const LogHelper &)
 
LogHelperoperator= (const LogHelper &)
 

Private Attributes

std::ofstream mLogFile
 
LogLevel mLogLevel
 

Static Private Attributes

static unsigned int mBarWidth = 70
 
static LogHelperPtr mInstance = NULL
 

Detailed Description

Definition at line 37 of file LogHelper.hpp.

Constructor & Destructor Documentation

ISM::LogHelper::LogHelper ( path  logFilePath,
LogLevel  level 
)

Definition at line 40 of file LogHelper.cpp.

ISM::LogHelper::LogHelper ( const LogHelper )
private

Member Function Documentation

void ISM::LogHelper::close ( )
static

Definition at line 116 of file LogHelper.cpp.

void ISM::LogHelper::displayProgress ( double  progress)
static

Definition at line 147 of file LogHelper.cpp.

LogHelperPtr ISM::LogHelper::getInstance ( )
static

Definition at line 122 of file LogHelper.cpp.

std::string ISM::LogHelper::getLogLevelString ( LogLevel  level)
private

Definition at line 133 of file LogHelper.cpp.

std::string ISM::LogHelper::getTimeString ( )
private

Definition at line 139 of file LogHelper.cpp.

void ISM::LogHelper::init ( path  logFilePath,
LogLevel  level 
)
static

Definition at line 106 of file LogHelper.cpp.

void ISM::LogHelper::log ( const std::string &  message,
LogLevel  logLevel = LOG_INFO,
const char *  logColor = LOG_COLOR_DEFAULT 
)
private

Definition at line 60 of file LogHelper.cpp.

void ISM::LogHelper::logLine ( LogLevel  logLevel = LOG_INFO)
static

Definition at line 101 of file LogHelper.cpp.

void ISM::LogHelper::logMessage ( const std::string &  message,
LogLevel  logLevel = LOG_INFO,
const char *  logColor = LOG_COLOR_DEFAULT 
)
static

Definition at line 96 of file LogHelper.cpp.

LogHelper& ISM::LogHelper::operator= ( const LogHelper )
private

Member Data Documentation

const char * ISM::LogHelper::LOG_COLOR_BLUE = "\033[34;1m"
static

Definition at line 44 of file LogHelper.hpp.

const char * ISM::LogHelper::LOG_COLOR_DEFAULT = "\033[0m"
static

Definition at line 43 of file LogHelper.hpp.

const char * ISM::LogHelper::LOG_COLOR_GREEN = "\033[32m"
static

Definition at line 46 of file LogHelper.hpp.

const char * ISM::LogHelper::LOG_COLOR_MAGENTA = "\033[35m"
static

Definition at line 48 of file LogHelper.hpp.

const char * ISM::LogHelper::LOG_COLOR_RED = "\033[31m"
static

Definition at line 45 of file LogHelper.hpp.

const char * ISM::LogHelper::LOG_COLOR_YELLOW = "\033[33m"
static

Definition at line 47 of file LogHelper.hpp.

unsigned int ISM::LogHelper::mBarWidth = 70
staticprivate

Definition at line 64 of file LogHelper.hpp.

LogHelperPtr ISM::LogHelper::mInstance = NULL
staticprivate

Definition at line 59 of file LogHelper.hpp.

std::ofstream ISM::LogHelper::mLogFile
private

Definition at line 61 of file LogHelper.hpp.

LogLevel ISM::LogHelper::mLogLevel
private

Definition at line 62 of file LogHelper.hpp.


The documentation for this class was generated from the following files:


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41