1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-26 10:29:31 +00:00

Adds the option to affix a standard prefix to log messages.

This commit is contained in:
Thomas Harte 2019-10-10 22:45:03 -04:00
parent a59ec9e818
commit d1dd6876b5

View File

@ -26,6 +26,16 @@
#define PADHEX(n) std::hex << std::setfill('0') << std::setw(n)
#define PADDEC(n) std::dec << std::setfill('0') << std::setw(n)
#ifdef LOG_PREFIX
#define LOG(x) std::cout << LOG_PREFIX << x << std::endl
#define LOGNBR(x) std::cout << LOG_PREFIX << x
#define ERROR(x) std::cerr << LOG_PREFIX << x << std::endl
#define ERRORNBR(x) std::cerr << LOG_PREFIX << x
#else
#define LOG(x) std::cout << x << std::endl
#define LOGNBR(x) std::cout << x
@ -34,5 +44,7 @@
#endif
#endif
#endif /* Log_h */