Okay so I have a WCF service writing to the Event Log.
All is well except for one detail..it won't pay any attention to the logName attribute,..here's the config.
<!--EventLog Appender-->
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<logName value="MyCustomLog"/>
<applicationName value="MyCustomEventSource" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
</appender>
..and the initialization code.
//Create an instance of the log from the declaring type.
var stackTrace = new StackTrace();
var frame = stackTrace.GetFrame(0);
log = LogManager.GetLogger(frame.GetMethod().DeclaringType);
BasicConfigurator.Configure();
The event log does get written to but in the Application log (using the MyCustomEventSource" source) rather than my own. Clearly I'm missing some important point but I don't see what that might be... I'm running on Win 7 and IIS 7.5 if that makes any diff.
Any help would be appreciated.