Dear Community,
I was wondering if it is possible to name a log file after an assembly
via the config file. Here is my config file:
--
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net"
type="System.Configuration.IgnoreSectionHandler"/>
</configSections>
<log4net>
<root>
<level value="ALL"/>
<appender-ref ref="LogFileAppender"/>
</root>
<appender name="LogFileAppender"
type="log4net.Appender.FileAppender">
<threshold value="ALL"/>
<file value="log4net.log"/>
<appendToFile value="false"/>
<immediateFlush value="true"/>
<lockingModel
type="log4net.Appender.FileAppender+ExclusiveLock" />
<layout type="log4net.Layout.PatternLayout">
<header value="[Start of
Execution] "/>
<footer value="[End of
Execution] "/>
<conversionPattern value="%date
[%thread] %-5level %logger [%property{NDC}] - %message%newline"/>
</layout>
</appender>
</log4net>
</configuration>
--
Would it be possible to replace "log4net.log" with some other parameter
that would refer to the assembly name say in braces and then add on a
file extension. For example:
<file value="{AssemblyName}.log"/>
Or is there some other way to accomplish this?
Thanks
Sincerely,
Milad