Appoint filename of FlatFile TraceListener for logging at runtime

Topics: Logging Application Block
Jan 29, 2010 at 12:06 PM


I want to current date as log file name. like 2010-01-29.log.

Can I set filename attribute of FlatFile TraceListener at runtime?

I tried to ues ExeConfigurationFileMap modify config file. but the modification just takes effect after restart the application.

I want to the modification takes effect immediately.




Feb 1, 2010 at 5:34 AM
Edited Feb 1, 2010 at 6:13 AM


are you using a external config file? as described in the documentation . Also, are you using this in the context of Windows Application? I've tried it using a windows application and i was modifying the runtime config, which is the one with ".vshost.exe.config" extension, and the update on the config file has taken effect immediately. I can send you my sample application.


Valiant Dudan
Global Technology and Solutions
Avanade, Inc.