Logging custom destination

Topics: Logging Application Block
Mar 31, 2009 at 9:31 PM

I would like to implement logging using custom destinations every time i run a batch job. 

1) My .net batch job runs every day once. When it runs i need to create log file with the date and time stamp. 
2) How do i specify programmatically Log file destination every time i run the program. 

Please let me know are there any way i can achieve that. 

Apr 1, 2009 at 10:50 AM
I think you're gonna have to do this by modifying the configuration during runtime.  A sample code is posted here - http://entlib.codeplex.com/Thread/View.aspx?ThreadId=42345
Take note also that there is a slight delay for changes to take effect. To control this delay, try calling the ConfigurationChangeWatcher.SetDefaultPollDelayInMilliseconds(pollDelayInMilliseconds) method.

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.