|
From: <Seb...@gm...> - 2010-09-16 13:46:10
|
Hi!
I am using Common.Looging 2.0 and Log4Net with a RollingFileAppender. This works fine. Now I want to log the method name. So I adapted the ConversionPattern. This is my config now and it does not log the method names.
<configSections>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections>
<common>
<logging>
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net">
<arg key="configType" value="INLINE" />
</factoryAdapter>
</logging>
</common>
<log4net debug="false">
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender, log4net" >
<param name="File" value="logs\Test.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Size" />
<param name="MaxSizeRollBackups" value="1" />
<param name="MaximumFileSize" value="10MB" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout, log4net">
<param name="ConversionPattern" value="%date{dd.MM.yyyy HH:mm:ss,fff} - %4thread - %-5level - %logger - %class.%method : %message%newline" />
</layout>
</appender>
<root>
<priority value="ALL" />
<appender-ref ref="RollingFileAppender" />
</root>
</log4net>
And this is the corresponding log, I miss the "Main()" method name.
16.09.2010 15:27:46,739 - 10 - DEBUG - ConsoleApplication1.Program - Common.Logging.Factory.AbstractLogger.Debug : testmessage
What am I doing wrong?
--
Hi, ich bin SeboStone!
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
|