Typically, a file contains code pertaining to only one component, and as such, there is only one channel to output to. To simplify usage, you can declare that channel at the beginning of the file, and simply write FIXMEs, ERRs, etc. as such:
#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(xxx); ... FIXME("some unimplemented feature", ...); ... if (zero != 0) ERR("This should never be non-null: %d", zero); ... |
I rare situations there is a need to output to more then one debug channel per file. In such cases, you need to declare all the additional channels at the top of the file, and use the _-version of the debugging macros:
#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(xxx); WINE_DECLARE_DEBUG_CHANNEL(yyy); WINE_DECLARE_DEBUG_CHANNEL(zzz); ... FIXME("this one goes to xxx channel"); ... FIXME_(yyy)("Some other msg for the yyy channel"); ... WARN_(zzz)("And yet another msg on another channel!"); ... |
If you need to declare a new debugging channel, simply use it in your code. It will be picked up automatically by the build process.