logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minherz <minh...@gmail.com>
Subject Re: Logging in dependency of release or debug mode
Date Mon, 30 Apr 2007 09:55:28 GMT

I think it has nothing to do with configuration, since Debug and Release are
not smth. that you can identify in the runtime. However, you can put in the
code dependencies which code will be compiled depending on DEBUG conditional
variable.
For example something like
#if DEBUG
 logger.Debug("Display debug output");
#else
 if (logger.isInfoEnabled)
 {
   logger.Info("Display different informational output");
 }
#endif


Some user wrote:
> 
> Hi,
> 
> can I use log4net to log something in dependency of the VisualStudio
> release mode or debug mode?
> 
> Example:
> I don't want the end user to see notice logs when he uses the release
> build.
> 
> How can I config this?
> 
> Thanx!!!
> 

-- 
View this message in context: http://www.nabble.com/Logging-in-dependency-of-release-or-debug-mode-tf3491534.html#a10250933
Sent from the Log4net - Users mailing list archive at Nabble.com.


Mime
View raw message