mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-26 09:29:45 +00:00
Adds the option to affix a standard prefix to log messages.
This commit is contained in:
parent
52e5296544
commit
2581b520af
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user