In the log4net configuration file, change the Appender section to add a PatternLayout with a custom format. The following template will output DateTime ClassName.MethodName
<appender name="DebugOut" type="log4net.Appender.OutputDebugStringAppender"> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date{MM/dd/yy HH:mm} %C{1}.%M" /> </layout> </appender>
You can print the fully qualified class name by changing %C{1} to %C
source share