On Wed, 23 Nov 2016, mosto...@gmail.com wrote:
yup, the function is named DBGPRINTF() and some helpers. Being used
since ~1970 (the original dbgprintf() call stems back to the original
code ;)). Sometimes we use #ifdef DEBUG, but only if we actually need
to compute something beyond simple output generation (e.g. iterate
over a structure). This can't be done efficiently without #ifdef.
Perhaps replacing
#ifdef foo
whatever lines you may want
#endif
with
CODE_TO_HANDLE_WHATEVER macro, defined on file
/code_to_handle_whatever_macro.c/
?
Maybe I'm wrong, but if it's between ifdef, it can be ommited at first level
sight...
I think you are missing the point that the vast majority of the debugging stuff
is already done the way you are looking for, using the DBGPRINTF() function.
Creating a macro for code that only exists in one place doesn't make sense, and
ifdef around that is far more sensible.
David Lang
similar, a verbosity level, and partial support is available via the
RSYSLOG_DEBUG variable (you can turn on/off some debugging features).
But it's still in its infancy. Would really be good to have.
Ok!
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T
LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.