Appoint filename of FlatFile TraceListener for logging at runtime

Topics: Logging Application Block
Jan 29, 2010 at 11:06 AM

Hi,

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.

 

Thanks,

Simon

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

Hi,

are you using a external config file? as described in the documentation http://msdn.microsoft.com/en-us/library/dd203211.aspx . 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.
entlib.support@avanade.com