Hi
I have a vb.net winform app that uses SUB Main in module modMain as
start-up.
I have copied log4net.dll and log4net.xml files to the application main
folder. I have added log4net.dll to application references.
I have added below configuration in file Logging.Xml and have placed it in
the application main folder.
Logging.Xml -- BEGIN
<log4net>
<appender name="Console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<!-- Pattern to output the caller's file name and line number
-->
<conversionPattern value="%5level [%thread] (%file:%line) -
%message%newline" />
</layout>
</appender>
<appender name="RollingFile"
type="log4net.Appender.RollingFileAppender">
<file value="example.log" />
<appendToFile value="true" />
<maximumFileSize value="100KB" />
<maxSizeRollBackups value="2" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%level %thread %logger -
%message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="Console" />
<appender-ref ref="RollingFile" />
</root>
</log4net>
Logging.Xml -- END
My questions are;
1. In modMian I added the following line
Private ReadOnly log As ILog = LogManager.GetLogger(GetType(xxxx))
What do I enter in place of xxxx?
2. How do I tell my app to use Logging.Xml for configuration from the
application main folder?
Thanks
Regards
Yahya