logging: use debug guard in all debug macros