I am using Ent Lib 5. I have a Event Log Listener with the Source attribute currently set to a generic name for our suite of applications.
This configuration file is linked/shared with several projects (long story and will not change).
We would still like each application to put its own Source name in the event log to uniquely identify it...how do I go about changing the Source name at run time?
I can easily change anything I want about the actual log event itself but I want to change the listener source attribute for each app.
Hopefully this makes sense
UPDATE: Here is the config setting that we are using...it is the SOURCE attribute that I want to change at runtime.
add name="Formatted EventLog General" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" formatter="Text Formatter" traceOutputOptions="None" filter="All" machineName="." source="CHANGE AT RUNTIME" log="Application"