#pragma once // Logging is compiled in for Debug builds only. In Release the macro expands to // nothing, so neither the format string nor its arguments survive into the // binary - no log file, no debug output, no strings for an analyst to read. #ifndef ARDRV_LOG_ENABLED #ifdef _DEBUG #define ARDRV_LOG_ENABLED 1 #else #define ARDRV_LOG_ENABLED 0 #endif #endif #if ARDRV_LOG_ENABLED void LogImpl(const wchar_t* fmt, ...); #define Log(...) LogImpl(__VA_ARGS__) #else #define Log(...) ((void)0) #endif