|
Dynamically changing connection string in XML config file.: msg#00041log.log4net.user
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: | FileAppender's OpenFile() has mandatory call to Directory.CreateDirectory(...): 00041, Ron Grabowski |
|---|---|
| Next by Date: | RE: Dynamically changing connection string in XML config file.: 00041, Josh Kewley |
| Previous by Thread: | RE: Logging in a Web App (Threads, Sessions and Requests)i: 00041, Ron Grabowski |
| Next by Thread: | RE: Logging in a Web App (Threads, Sessions and Requests): 00041, Hart, Leo |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |