C: what should I use for trace/diagnostic messages in a library?

Posted by Cheeso on Stack Overflow See other posts from Stack Overflow or by Cheeso
Published on 2010-03-27T19:45:33Z Indexed on 2010/03/27 19:53 UTC
Read the original article Hit count: 139

Filed under:

In .NET I would use System.Diagnostics.Trace...

What would I use in C or C++ ?

right now I have a macro defined:

diagnostics ON:

#define DIAG(A) { printf(A); }

debugging off:

#define DIAG(A) { if(FALSE) {}}

Is there a standard way?

© Stack Overflow or respective owner

Related posts about diagnostics