Might be even cleaner to have a standard logging function that itself looks for the "DEBUG" constant. I personally am not a big fan of #ifdefs all over the code - makes things harder to read in my opinion.