Hello,
I am trying to configure log4net to log NH info within a WPF browser
application (xbap). I have not used log4net before so I am probably
missing something. I added the configuration info below (which I got
from an online post) to my App.config file and am calling
log4net.Config.XmlConfigurator.Configure(); just before I build the
SessionFactory. Please let me know what I might be missing.
<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections>
<!-- This section contains the log4net configuration settings -->
<log4net debug="false">
<!-- Define some output appenders -->
<appender name="trace" type="log4net.Appender.TraceAppender,
log4net">
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:
%L - %m%n" />
</layout>
</appender>
<appender name="console" type="log4net.Appender.ConsoleAppender,
log4net">
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:
%L - %m%n" />
</layout>
</appender>
<appender name="rollingFile"
type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="C:\log.txt" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyy.MM.dd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m
%n" />
</layout>
</appender>
<!-- Setup the root category, add the appenders and set the
default priority -->
<root>
<priority value="DEBUG" />
<appender-ref ref="console" />
</root>
</log4net>
Thanks in advance,
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---