26 #include <elm/io/Output.h>
27 #include <elm/string/CString.h>
28 #include <elm/string/AutoString.h>
58 inline operator const char*()
const
59 {
return (*
this)().chars(); }
61 {
return (out << color()); }
63 {
return out << color().chars(); }
78 const Color
RCol(
"\e[0m");
79 const Color
Bold(
"\e[1m");
80 const Color
Dim(
"\e[2m");
81 const Color
NoBold(
"\e[21m");
82 const Color
NoDim(
"\e[22m");
95 #define ELM_DBG(str) { if(elm::log::flags&elm::log::DEBUG) elm::cout << elm::log::Debug::debugPrefix(__FILE__, __LINE__) << str << elm::color::RCol(); } // standard debug
96 #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; } // debug with new line
97 #define ELM_DBGV(level, str) { if(level & elm::log::verbose_level) ELM_DBG(str); } // verbose debug
102 #define DBGLN ELM_DBGLN
const Color On_IGre("\e[0;102m")
const Color Bold("\e[1m")
const Color On_Yel("\e[43m")
const Color BRed("\e[1;31m")
int flags
Flags to set for the debugging macros.
Definition: log_Log.cpp:52
const Color IGre("\e[0;92m")
const Color Bla("\e[0;30m")
const Color ICya("\e[0;96m")
const Color BIYel("\e[1;93m")
const Color UWhi("\e[4;37m")
friend elm::io::Output & operator<<(elm::io::Output &out, const Color &color)
Definition: Log.h:60
int verbose_level
Verbose bit mask. ELM_DBGV will only be enabled if the provided parameter level & verbose_level is no...
Definition: log_Log.cpp:60
const Color On_IYel("\e[0;103m")
const Color IBla("\e[0;90m")
const Color IBlu("\e[0;94m")
const Color URed("\e[4;31m")
const Color BICya("\e[1;96m")
const Color On_IPur("\e[0;105m")
const Color NoBold("\e[21m")
int srcpath_length
Numeric value that defines the constant length of the source path in the prefix.
Definition: log_Log.cpp:68
const Color BYel("\e[1;33m")
const Color BIBla("\e[1;90m")
const Color BWhi("\e[1;37m")
const Color UBla("\e[4;30m")
const Color UPur("\e[4;35m")
const Color BBla("\e[1;30m")
const Color BGre("\e[1;32m")
Define ANSI colors (including foreground, background, bold and underline) for global use in std C/elm...
Definition: Log.h:50
const Color On_IBla("\e[0;100m")
const Color Pur("\e[0;35m")
const Color On_Red("\e[41m")
const Color On_Bla("\e[40m")
const Color BIRed("\e[1;91m")
const Color NoDim("\e[22m")
const Color On_Blu("\e[44m")
const Color On_Gre("\e[42m")
elm::CString operator()() const
Definition: Log.h:54
const Color BIBlu("\e[1;94m")
static elm::String debugPrefix(const char *file, int line)
Definition: log_Log.cpp:106
const Color BCya("\e[1;36m")
const Color Whi("\e[0;37m")
elm::color::Color prefix_color
Color used for printing the prefix message. The default value is elm::color::Yel. ...
Definition: log_Log.cpp:76
const Color BPur("\e[1;35m")
sys::SystemOutStream & out
Definition: system_SystemIO.cpp:101
const Color UGre("\e[4;32m")
const Color UYel("\e[4;33m")
const Color Yel("\e[0;33m")
const Color On_Cya("\e[46m")
const Color On_Whi("\e[47m")
const Color Blu("\e[0;34m")
const Color BBlu("\e[1;34m")
const Color On_ICya("\e[0;106m")
Color(const elm::CString &str)
Definition: Log.h:53
const Color Gre("\e[0;32m")
const Color On_IRed("\e[0;101m")
const Color BIWhi("\e[1;97m")
const Color On_IBlu("\e[0;104m")
const Color On_IWhi("\e[0;107m")
const Color On_Pur("\e[45m")
const Color UBlu("\e[4;34m")
Provide necessary static methods for the use of ELM_DBG* macros.
Definition: Log.h:88
const Color UCya("\e[4;36m")
const Color IWhi("\e[0;97m")
const Color BIGre("\e[1;92m")
const Color IPur("\e[0;95m")
const Color RCol("\e[0m")
friend std::ostream & operator<<(std::ostream &out, const Color &color)
Definition: Log.h:62
const Color Cya("\e[0;36m")
const Color Red("\e[0;31m")
const Color IYel("\e[0;93m")
const Color BIPur("\e[1;95m")
const Color IRed("\e[0;91m")