|
RE: Dynamically changing connection string in XML config file.: msg#00042log.log4net.user
I did a similar thing in a web environment for a FileAppender. http://insario.com/blog/jfk/archive/2004/11/30/164.aspx -Josh -----Original Message----- From: Diego Barros [mailto:diego@xxxxxxxxxxx] Sent: Thursday, February 10, 2005 9:04 PM To: Log4NET User Subject: Dynamically changing connection string in XML config file. Hello all, I was wondering whether it was possible to set the ADONetAppender's connection string in code when configuring log4net? During testing I have a config file which had a hard coded connection string for the database connection. I would like to modify that just prior to log4net being configured, but still have the configuration in the XML file. Is this possible? Where I had: log4net.Config.DOMConfigurator.Configure(new System.IO.FileInfo(@"c:\temp\MyApp.conf")); I would like to have a different connection string for the ADONetAppender than what exists in MyApp.conf. Is this possible? Or should I go about this another way? The connection string that I need to use may change and would be retrieved from another location. Any help would be appreciated. Cheers, Diego |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Dynamically changing connection string in XML config file.: 00042, Diego Barros |
|---|---|
| Next by Date: | RE: Dynamically changing connection string in XML config file.: 00042, Hart, Aaron |
| Previous by Thread: | FileAppender's OpenFile() has mandatory call to Directory.CreateDirectory(...)i: 00042, Ron Grabowski |
| Next by Thread: | RE: Dynamically changing connection string in XML config file.: 00042, Hart, Aaron |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |