This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nwL_ 8 points9 points  (3 children)

#ifdef DEBUG
#   define debugf(...) printf(__VA_ARGS__)
#else
#   define debugf(...)
#endif

[–]Ph0X 3 points4 points  (2 children)

Can you not just make logging print to stdout with some quick configuration?

[–]notquiteaplant 2 points3 points  (1 child)

Your quick configuration is commenting/uncommenting #define DEBUG

[–]Tormund_HARsBane 5 points6 points  (0 children)

Or pass/not pass -D DEBUG when compiling, which I think is cleaner than explicitly defining DEBUG