Is it possible when we can change the solution configuration from Debug and Release, we make certain chunk of code ignore by the compiler,
which also means those chunk of code only run in Debug environment?
the libraries above come with some form of filtering so you can choose which messages to acutally log at run time (config file). by changing the configs between debug and release you can filter different messages.
typically the log levels are debug(0), trace(1), information(2), warning(3), error(4). the lower the level the sooner the message is ignored.
A lot of people have good luck with Log4Net - I always end up writing my own which spits out to an encrypted log file which I can then have my C# app email to me
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.