Debugging Log4Net

I encountered a problem with log4net ADONetAppender not logging. It logs everything for EventLogAppender but not with ADONetAppender. Obviously, there is something wrong.  First guess, something is wrong with configuration. I checked. All nodes and elements looks good. So what’s wrong. Then I need

Setting log4net configuration properties from codebehind

Problem: You want to set configuration properties in log4net from codebehind. For example: ApplicationName, log file path or name etc. Solution: Easiest way to do it is to use Global Context properties and log4net.Util.PatternString.

On your config file, use