You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to update the #define MSG macro in debug.h to add a space after "%s"? Without the space, you have to add a space at the head of your fmt message to provide separation between MOD_NAME and that message.
Also, more of a personal/syntax question -- should a "\n" be included at the tail of the fmt line ("%s " fmt "\n") to automatically append a newline without having to manually do it with each message? Would that be better served with a new macro that specifies a newline will be added?
Also, in keeping with moving towards preference for MSG, would it be possible to create a similar macro for log_msg_once?
Added. The current implementation isn't using id parameter explicitly but the key is constructed from MOD_NAME address and __COUNTER__. Also it doesn't include trailing '\n' - I am not convinced about this - the MSG()/log_msg() functions are intended to be printf-alike, notably utilizing printf-like format. And since printf doesn't append a newline, so doesn't these.
Hi there!
Would it be possible to update the
#define MSG
macro indebug.h
to add a space after "%s"? Without the space, you have to add a space at the head of your fmt message to provide separation between MOD_NAME and that message.Also, more of a personal/syntax question -- should a "\n" be included at the tail of the fmt line (
"%s " fmt "\n"
) to automatically append a newline without having to manually do it with each message? Would that be better served with a new macro that specifies a newline will be added?Current
MSG
implementation:Proposed change:
Also, in keeping with moving towards preference for MSG, would it be possible to create a similar macro for log_msg_once?
Proposed
MSG_ONCE
implementation:The text was updated successfully, but these errors were encountered: