Hello,
I'm interested in
added method name data in my logging messages, so I've set up my
RollingFileAppender like this:
<appender name="File - Support" type="log4net.Appender.RollingFileAppender">
<param name="File" value="c:\\LogFiles\\ReferenceApp\\ReferenceApp" />
<param name="AppendToFile" value="true" />
<param name="DatePattern" value=" - yyyy-MM-dd.'log'" />
<param name="RollingStyle" value="Date" />
<param name="StaticLogFileName" value="false" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%-5p | %d{yyyy-MM-dd HH:mm:ss, fff} | %t | %c | %M | %t | %m%n" />
</layout>
</appender>
%M tells
Log4Net to output the name of the method within which the logging statement was
generated.
Now, I
have Ceki Culcu's book for log4j (I was a Java developer in a previous
life). Within that he states:
On certain platforms, generating the caller class information can be excruciatingly slow. Thus, the user of the C, F, l, L, and M conversion characters should be avoided unless execution speed is not an issue.
My
question is, given that I'm using Log4Net (1.2.8b) and not Log4J and my platform
is .NET 1.1, is this statement still true? And if so, does anyone have any
benchmarks indicating how much of a performance penalty will be taken for using
the %M character?
Thanks,
Leo
Hart
