One possible cause of this problem may be the Logging Level . Check if the FATAL logging level is set, and if so, try replacing this part of web.config:
<log4net> ..... <root> <level value="FATAL" /> <appender-ref ref="RollingFileAppender" /> </root> ..... </log4net>
with this:
<log4net> ...... <root> <level value="DEBUG" /> <appender-ref ref="RollingFileAppender" /> </root> .... </log4net>
Furthemore do not forget to check in the web.config section for possible occurrences of some
<filter type="log4net.Filter.StringMatchFilter"> <stringToMatch value="test" /> </filter>
p. In this case, even if the logging level is set to DEBUG (for example), and you enter the code somehow like:
log.Debug("Db quering...");
it will always be empty, but if you write, for example:
log.Debug("test: Db quering...");
Try therefore to comment on sections of the filter, as well as this line.
<filter type="log4net.Filter.DenyAllFilter" />
And this moment, finally, you have to make it work !!
Hope this helps
Fuvizzo
source share