Easy Simple Network Library  0.3.7
All Classes Functions Modules
Static Public Member Functions | Static Public Attributes | List of all members
esnlib::LogManager Class Reference

Global log manager. More...

#include <LogManager.h>

Static Public Member Functions

static void Init (const std::string &defaultloggername="", const std::string &defaultlogpath="")
 
static LoggerPtr AddLogger (const std::string &loggername, const std::string &logpath="")
 
static void RemoveLogger (const std::string &loggername)
 
static LoggerPtr GetLogger (const std::string &loggername)
 
static LoggerPtr GetDefaultLogger ()
 
static void Clear ()
 
static void SetLogLevel (int level)
 
static int GetLogLevel ()
 
static void Trace (const std::string &msg)
 
static void Trace (const std::string &loggername, const std::string &msg)
 
static void Debug (const std::string &msg)
 
static void Debug (const std::string &loggername, const std::string &msg)
 
static void Info (const std::string &msg)
 
static void Info (const std::string &loggername, const std::string &msg)
 
static void Warning (const std::string &msg)
 
static void Warning (const std::string &loggername, const std::string &msg)
 
static void Error (const std::string &msg)
 
static void Error (const std::string &loggername, const std::string &msg)
 
static void Fatal (const std::string &msg)
 
static void Fatal (const std::string &loggername, const std::string &msg)
 

Static Public Attributes

static const int LOG_LEVEL_TRACE = 0
 
static const int LOG_LEVEL_DEBUG = 1
 
static const int LOG_LEVEL_INFO = 2
 
static const int LOG_LEVEL_WARNING = 3
 
static const int LOG_LEVEL_ERROR = 4
 
static const int LOG_LEVEL_FATAL = 5
 

Detailed Description

Global log manager.

Member Function Documentation

static void esnlib::LogManager::Debug ( const std::string &  msg)
static

Log message for debugging

Parameters
msgThe message
static void esnlib::LogManager::Error ( const std::string &  msg)
static

Log message of error

Parameters
msgThe message
static void esnlib::LogManager::Fatal ( const std::string &  msg)
static

Log message of fatal error

Parameters
msgThe message
static int esnlib::LogManager::GetLogLevel ( )
static

Get minimum log level

Returns
The minimum log level
static void esnlib::LogManager::Info ( const std::string &  msg)
static

Log message for informing

Parameters
msgThe message
static void esnlib::LogManager::Init ( const std::string &  defaultloggername = "",
const std::string &  defaultlogpath = "" 
)
static

Init global log function

Parameters
defaultloggernameThe default logger's name
defaultlogpathThe default path where the log files will be stored
static void esnlib::LogManager::SetLogLevel ( int  level)
static

Set minimum log level

Parameters
levelThe minimum level
static void esnlib::LogManager::Trace ( const std::string &  msg)
static

Log message for tracing

Parameters
msgThe message
static void esnlib::LogManager::Warning ( const std::string &  msg)
static

Log message for warning

Parameters
msgThe message

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