EDN Admin
Well-known member
i am using .net framework 4.0 and the log4net for the net framework 4.0 , i am using the app.configuration file for the log4net here it is my config file.
<configuration><br/>
<configSections><br/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/><br/>
</configSections><br/>
<log4net><br/>
<appender Name=" LogFileAppender" type="log4net.Appender.FileAppender <br/>
<param name="File" value="D:log-file.txt" /><br/>
<param name="AppendToFile" value="true"/><br/>
<layout type="log4net.Layout.PatternLayout <br/>
<param name="Header" value="[Header]rn"/><br/>
<param name="Footer" value="[Footer]rn"/><br/>
<param name="ConversionPattern" value="%d [%t] %-5p %c %m%n"/><br/>
</layout> <br/>
</appender><br/>
<root><br/>
<level value="ALL"/><br/>
<appender-ref ref="LogFileAppender"/> <br/>
</root><br/>
</log4net>
i also put the
assembly: log4net.Config.XmlConfigurator(ConfigFile ="app.config",Watch=true)]
and also changed the applicaiton target frame to .net framework 4 but still the log file is not creating ..can anybody help me where i am doing wrong ? any sort of help will be highly appreciated.
View the full article
<configuration><br/>
<configSections><br/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/><br/>
</configSections><br/>
<log4net><br/>
<appender Name=" LogFileAppender" type="log4net.Appender.FileAppender <br/>
<param name="File" value="D:log-file.txt" /><br/>
<param name="AppendToFile" value="true"/><br/>
<layout type="log4net.Layout.PatternLayout <br/>
<param name="Header" value="[Header]rn"/><br/>
<param name="Footer" value="[Footer]rn"/><br/>
<param name="ConversionPattern" value="%d [%t] %-5p %c %m%n"/><br/>
</layout> <br/>
</appender><br/>
<root><br/>
<level value="ALL"/><br/>
<appender-ref ref="LogFileAppender"/> <br/>
</root><br/>
</log4net>
i also put the
assembly: log4net.Config.XmlConfigurator(ConfigFile ="app.config",Watch=true)]
and also changed the applicaiton target frame to .net framework 4 but still the log file is not creating ..can anybody help me where i am doing wrong ? any sort of help will be highly appreciated.
View the full article