As side product of the development of HGL (see here http://www.cplusplus.com/forum/lounge/91447/) I produced a simple but expandable console logger.
Simple to use:
logError("couldn't compress output");
logDebug("Details: " << e.what());
It supports log for following types:
- const std::string * - null safe
- bool - text support, i.e. output as true/false
A note on std::type_info
: if HAVE_GCC_ABI_DEMANGLE
is defined and supported by the compiler, the name of the type will get demangled.
The logger is expandable by subclassing it. So new supported types can be introduced easily. I splitted it myself into the BasicLogger
which is of common use and have subclasssed it for HGL specific logs.
Attached are all needed source files.