mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-27 00:30:26 +00:00
Adds the option to affix a standard prefix to log messages.
This commit is contained in:
parent
a59ec9e818
commit
d1dd6876b5
@ -26,6 +26,16 @@
|
|||||||
#define PADHEX(n) std::hex << std::setfill('0') << std::setw(n)
|
#define PADHEX(n) std::hex << std::setfill('0') << std::setw(n)
|
||||||
#define PADDEC(n) std::dec << 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 LOG(x) std::cout << x << std::endl
|
||||||
#define LOGNBR(x) std::cout << x
|
#define LOGNBR(x) std::cout << x
|
||||||
|
|
||||||
@ -34,5 +44,7 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* Log_h */
|
#endif /* Log_h */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user