I've got an EventLogTraceListener set up in my code and currently configured to write to the default Windows event log, in this case the Application log. I've created a new event log source and I want to be able to write my messages to the new event log source and not the default (application log). I've seen a couple of examples that pass the log name into the initializedata attribute of the tracelistener, but I'm not able to get this to work. Any help would be greatly appreciated. Here is a snippet from my app.config:
<system.diagnostics>
<sources>
<source name="RoutingServiceSource" switchName="RoutingServiceSourceSwitch" switchType="System.Diagnostics.SourceSwitch">
<listeners>
<!--<add name="RoutingServiceListener" type="System.Diagnostics.EventLogTraceListener" initializeData="Log=AGOC;Source=AGOC.Routing.Outbound">-->
<add name="RoutingServiceListener" type="System.Diagnostics.EventLogTraceListener" initializeData="RoutingService">
<!--<filter type="System.Diagnostics.EventTypeFilter" initializeData="Error"/>-->
</add>
</listeners>
</source>
</sources>
<!--<trace autoflush="false" indentsize="4">
<listeners>
<add name="RoutingServiceListener" type="System.Diagnostics.EventLogTraceListener" initializeData="RoutingService">
</add>
</listeners>
</trace>-->
<!--Switch values:
Error=Output error-handling messages.
Info=Output informational messages, warnings, and error-handling messages.
Off=Output no tracing and debugging messages.
Verbose=Output all debugging and tracing messages.
Warning=Output warnings and error-handling messages.-->
<switches>
<add name="RoutingServiceSourceSwitch" value="Error" />
</switches>
</system.diagnostics>