Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
Classes | |
class | elm::color::Color |
Define ANSI colors (including foreground, background, bold and underline) for global use in std C/elm strings/outstreams, using implicit type conversions. More... | |
class | elm::log::Debug |
Provide necessary static methods for the use of ELM_DBG* macros. More... | |
Macros | |
#define | ELM_DBG(str) { if(elm::log::flags&elm::log::DEBUG) elm::cout << elm::log::Debug::debugPrefix(__FILE__, __LINE__) << str << elm::color::RCol(); } |
Format and output the string str on the log, depending on the global parameters set in flags and srcpath_length. If ELM_NO_DBG is not defined, the alias DBG is available. More... | |
#define | ELM_DBGLN(str) { if(elm::log::flags&elm::log::DEBUG) elm::cout << elm::log::Debug::debugPrefix(__FILE__, __LINE__) << str << elm::color::RCol() << elm::io::endl; } |
The same as ELM_DBG, except it adds a new line character at the end. If ELM_NO_DBG is not defined, the alias DBG is available. More... | |
#define | ELM_DBGV(level, str) { if(level & elm::log::verbose_level) ELM_DBG(str); } |
Will only output the string str if (level & verbose_level) is non-null, that is, if one of the bits in the bit mask level is set to 1 in the global variable verbose_level. More... | |
Variables | |
int | elm::log::flags = DEBUG | COLOR | SOURCE_INFO | NUMBERING |
Flags to set for the debugging macros. More... | |
int | elm::log::verbose_level = 0xffff |
Verbose bit mask. ELM_DBGV will only be enabled if the provided parameter level & verbose_level is non-null. More... | |
int | elm::log::srcpath_length = 20 |
Numeric value that defines the constant length of the source path in the prefix. More... | |
elm::color::Color | elm::log::prefix_color = elm::color::Yel |
Color used for printing the prefix message. The default value is elm::color::Yel. More... | |
Module for parametrized pretty-printing logs on the console, with colors, automatically prefixed by source path and such.
#define ELM_DBG | ( | str | ) | { if(elm::log::flags&elm::log::DEBUG) elm::cout << elm::log::Debug::debugPrefix(__FILE__, __LINE__) << str << elm::color::RCol(); } |
Format and output the string str on the log, depending on the global parameters set in flags and srcpath_length.
If ELM_NO_DBG is not defined, the alias DBG is available.
str | the string to print |
#define ELM_DBGLN | ( | str | ) | { if(elm::log::flags&elm::log::DEBUG) elm::cout << elm::log::Debug::debugPrefix(__FILE__, __LINE__) << str << elm::color::RCol() << elm::io::endl; } |
The same as ELM_DBG, except it adds a new line character at the end.
If ELM_NO_DBG is not defined, the alias DBG is available.
str | the string to print |
#define ELM_DBGV | ( | level, | |
str | |||
) | { if(level & elm::log::verbose_level) ELM_DBG(str); } |
Will only output the string str if (level & verbose_level) is non-null, that is, if one of the bits in the bit mask level is set to 1 in the global variable verbose_level.
str | the string to print |
level | bitmask to select the levels of verbose that should enable this debug. If level=0, it will never be printed. |
int elm::log::flags = DEBUG | COLOR | SOURCE_INFO | NUMBERING |
Flags to set for the debugging macros.
Referenced by elm::log::Debug::debugPrefix(), and elm::color::Color::operator()().
elm::color::Color elm::log::prefix_color = elm::color::Yel |
Color used for printing the prefix message. The default value is elm::color::Yel.
Referenced by elm::log::Debug::debugPrefix().
int elm::log::srcpath_length = 20 |
Numeric value that defines the constant length of the source path in the prefix.
Referenced by elm::log::Debug::debugPrefix().
int elm::log::verbose_level = 0xffff |
Verbose bit mask. ELM_DBGV will only be enabled if the provided parameter level & verbose_level is non-null.