the "hacker" way would be to wrap all the logging in a preprocessor directive, for example
#if DEBUG Log.Info(........) #endif
Visual-Studio will "smooth" the code inside. and have some kind of configuration header where you
#define DEBUG 0
Not the most beautiful, but nice if you don't want the debugging code compiled into your binary. Release
source share