Logging FileName in Application Data Folder

Topics: Logging Application Block
Jul 18, 2007 at 1:30 AM
Hi, how can I set the filename in FlatFileTraceListener or RollingFlatFileTraceListener to specify a log file/folder in the user's Application Data? After all, want to follow vista guidelines and not create files in the Application executable path. :)


Jul 18, 2007 at 1:38 PM
Hi Dan,

I agree this is a necessary feature, but unfortunately file based trace listeners do not support variable expansion. I'm logging this as a work item so it is considered for future releases.

For now, you could create your own trace listener configuration object and do the variable expansion there; this would be less effort than creating an entirely new trace listener. You'd need to copy class FlatFileTraceListenerData for runtime support. Providing design time support is more involved, as you need to set up a DesignManager class for your new assembly; you could use the application block factory to do the heavy lifting for you.

This would be a nice addition for entlibcontrib.

Jul 18, 2007 at 1:39 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.