I created a simple szenario using Log4net, but it seems that my appenders does not work because the messages are not added to the logfile.
I added the following to the web.config file:
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/>
</configSections>
<log4net>
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
<file value="D:\MyData\Desktop\LogFile.txt" />
<appendToFile value="true" />
<encoding value="utf-8" />
<layout type="log4net.Layout.SimpleLayout" />
</appender>
<root>
<level value="INFO" />
<appender-ref ref="LogFileAppender" />
</root>
</log4net>
Within the global ASAX file I added:
ILog logger = LogManager.GetLogger(typeof(MvcApplication));
and within the Application_Start()-Method:
logger.Info("Starting the application...");
what did I wrong?
Thanks in Advance Johannes