Is it easy to change the log4net section in the config file of multiple running applications remotely?
Our product consists of a client, server and agents. Each of them is deployed on different machines. QA has difficulty manipulating log4net sections in their respective config files. Right now, they should have remote desktops for all their respective machines and open notepad on each one, and then edit the files one at a time, switching between different machines as they go on. Real pain in the ass.
Can anyone suggest a better solution to this problem?
Thanks.
a source to share
You can save the log4net configuration to a database (then you might even consider creating a web interface that allows your QA team to change the configuration). You have to figure out how your applications get the new configuration (for example, you have some kind of remote admin interface that lets you tell your applications to use the new configuration).
On startup, you load the config from there. It may be advisable to have some backup configuration in the file that is loaded first if loading from the database fails. The default configuration would be, for example, so that the QA team receives an email if loading the configuration from the database failed.
Another option is to store all log4net configuration files on a network share ... create an application setting that tells your application where to find the log4net configuration and call the method Configure()
accordingly. Again, the question arises, how do your applications get the new configuration.
Not sure if ConfigureAndWatch () will behave as expected if the config files are on a network share. If so, then it would be a fairly simple option to implement.
a source to share