Dynamically change the Flatfile log name?

Topics: Logging Application Block
Jun 26, 2007 at 6:51 PM
I'm coming across something I've not readily seen how to do, and was wondering if anyone has seen and resolved the issue. The problem is that I have a multi instanced service using the logging block. As a result the output configuration files clash (and EL3 helps by putting a GUID on the name in the case it cant get access), however I would like to override the file name to append the instance name to the file.

Is there any way to query the configuration and update it (in memory only) to change the output file as each instance is started up? I can see a way to do it by directly creating the TraceListener but that takes away the 'nice' features of the higher level configuration. The ideal would be to modify the information returned by 'FileConfigurationSource', or hook into/override the 'Logger' facade.

Any one have any thoughts how to achieve this?

Thanks,

Gareth