I have a C # console application project that uses log4net as a logging library. Throughout the application, there are logging operators ( log.Debug(), log.Error()etc.) that are printed to the console as the program starts.
What is the best way to modify logging instructions in a production environment to minimize execution time caused by logging? I would like some of the applications not to be printed at all, and some registration applications to be printed only during production.
I am thinking of adding new parameters to a file Web.configthat determines how the log changes. However, I think I also need to override the methods log.Debug()and log.Error()to work with a new parameter, but I'm not sure how to do it. Can anyone advise?
source
share