Open cuavas opened 2 years ago
Opening at the request of @MooglyGuy.
Thanks, replying so that hopefully Github will let you assign it to me now.
Question: With "don't redefine LOG
", something like this would still be acceptable, yes?
#define LOGREGISTER(...) LOGMASKED(LOG_REGISTERS, __VA_ARGS__)
Yes, that’s fine, just don’t redefine LOG
itself to do something weird.
logmacro.h itself defines
LOG_GENERAL
to 1 (aka(1U << 0)
) and uses it with the abbeviatedLOG
macro (as opposed toLOGMASKED
) for convenience. Due to the way the preprocessor works, it’s safe to useLOG_GENERAL
when definingVERBOSE
before including logmacro.h itself.In the interest of keeping things familiar, unless there’s a very good reason, code should not:
1
,(1U << 0)
or equivalent.LOG_GENERAL
, especially to values other that1
.LOG
.