|
From: Peter A. K. <pk...@al...> - 2009-12-10 20:26:30
|
Hi – thanks for your reply.
I am using common-logging version 2.0.0.0
And log4net version 1.2.10.0
The configuration looks like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<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>
<appender name="ExampleAppender" type="log4net.Appender.RollingFileAppender">
<file value="./common_logging_logfile.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="100" />
<maximumFileSize value="1000KB" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d [%t] %-5p [%C.%M] - %m%n" />
</layout>
</appender>
<logger name="MainApplication.Program">
<level value="DEBUG" />
<appender-ref ref="ExampleAppender" />
</logger>
</log4net>
</configuration>
Med venlig hilsen / Best regards
Peter Kirk
E-mail: mailto:pk...@al...
From: Erich Eichinger [mailto:eei...@gm...]
Sent: 11. december 2009 01:42
To: Peter A. Kirk; net...@li...
Subject: RE: [Netcommon-developer] CommonLogging log4net - Email found in subject
Hi Peter,
What version of Common.Logging are you using? What version of Log4Net? How does your configuration look like?
tx for pointing me to the email mistake - jus t fixed
-Erich
From: Peter A. Kirk [mailto:pk...@al...]
Sent: Thursday, December 10, 2009 10:13 AM
To: net...@li...
Subject: [Netcommon-developer] CommonLogging log4net
Hi
I am using common-logging and log4net, with a lognet conversion pattern like:
<conversionPattern value="%d [%t] %-5p [%C.%M] - %m%n" />
The %C.%M should display the class.method name of the method doing the logging – and it does, except this is the class
[Common.Logging.Factory.AbstractLogger.Debug], and not the class I am really interested in.
Can I configure it such that it is the name of the class and method calling common-logging which is written to the log?
(BTW, on the this project’s page on sourceforge, the email-address for this project is given as
net...@li...<mailto:net...@li...>
but I am not sure if this is correct, so I have written to that address and
net...@li...<mailto:net...@li...>)
Med venlig hilsen / Best regards
Peter Kirk
E-mail: mailto:pk...@al...<mailto:cj...@al...>
|