I have 12 projects in my solution file. There are most Windows services (ServiceProj_1, ServiceProj_2, ...) and one project is of web application (WebApp). I use log4net for logging. WebApp and ServiceProject_1, ServiceProj_2, ... have log4net configuration into web.config and app.config files respectively. We have implemented a DMZ, so the WebApp is only exposed to the other people. Now there is a requirement to use logging of those windows service projects instead of WebApp.
I have come to know that I can create a custom appender and make it possible. The catch is, there are lots of lines already written into WebApp to log a LogMessage into log file so we cannot touch those lines.
I have no idea what to do and how to do. Need help. If the description is not understandable then please let me know I will try to explain more.
You can specify the config file and load it dynamically... Here my config file is found at the location of FullConfigFilePath.
Once the config is loaded you can access the values from there.... For instance.....
Hopefully you can tweak and use this sort of approach for your needs.