The LogConfig class. For get/set logging configurations. More...

#include <zupply.hpp>

Public Member Functions

std::vector< std::string > sink_list ()
 Get default sink list. More...
 
void set_sink_list (std::vector< std::string > &list)
 Set default sink list. More...
 
int log_level_mask ()
 Get default log level mask. More...
 
void set_log_level_mask (int newMask)
 Set default log level mask. More...
 
std::string format ()
 Get default logger format. More...
 
void set_format (std::string newFormat)
 Set default logger format. More...
 
std::string datetime_format ()
 Get default datetime format. More...
 
void set_datetime_format (std::string newDatetimeFormat)
 Set default datetime format. More...
 

Static Public Member Functions

static LogConfiginstance ()
 Get instance of LogConfig class. LogConfig is a singleton class, so use this to get the instance. More...
 
static void set_default_format (std::string format)
 Set default format for all future loggers. More...
 
static void set_default_datetime_format (std::string dateFormat)
 Set default datetime format for all future loggers. More...
 
static void set_default_sink_list (std::vector< std::string > list)
 Set default sink list for all future loggers. More...
 
static void set_default_level_mask (int levelMask)
 Set default level mask for all future loggers. Level mask is an int. Each bit control if corresponding level should be logged or not. More...
 

Detailed Description

The LogConfig class. For get/set logging configurations.

Member Function Documentation

std::string zz::log::LogConfig::datetime_format ( )

Get default datetime format.

Returns
Default datetime format
std::string zz::log::LogConfig::format ( )

Get default logger format.

Returns
Default format
LogConfig & zz::log::LogConfig::instance ( )
static

Get instance of LogConfig class. LogConfig is a singleton class, so use this to get the instance.

Returns
Reference to instance.
int zz::log::LogConfig::log_level_mask ( )

Get default log level mask.

Returns
Integer representing levels using bit mask
void zz::log::LogConfig::set_datetime_format ( std::string  newDatetimeFormat)

Set default datetime format.

Parameters
newDatetimeFormat
void zz::log::LogConfig::set_default_datetime_format ( std::string  dateFormat)
static

Set default datetime format for all future loggers.

Parameters
dateFormat
void zz::log::LogConfig::set_default_format ( std::string  format)
static

Set default format for all future loggers.

Parameters
format
void zz::log::LogConfig::set_default_level_mask ( int  levelMask)
static

Set default level mask for all future loggers. Level mask is an int. Each bit control if corresponding level should be logged or not.

Parameters
levelMaskA bit mask.
void zz::log::LogConfig::set_default_sink_list ( std::vector< std::string >  list)
static

Set default sink list for all future loggers.

Parameters
listA vector of strings storing the name of sinks
void zz::log::LogConfig::set_format ( std::string  newFormat)

Set default logger format.

Parameters
newFormat
void zz::log::LogConfig::set_log_level_mask ( int  newMask)

Set default log level mask.

Parameters
newMask
void zz::log::LogConfig::set_sink_list ( std::vector< std::string > &  list)

Set default sink list.

Parameters
listVector of names of the sinks to be set
std::vector< std::string > zz::log::LogConfig::sink_list ( )

Get default sink list.

Returns
std::vector of sink names

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