I have a project that includes 10 dlls, each dll uses log4net to log. The project is not started by me, I got it like this and I need to continue it. Because it’s first time for me working with log4net, I’d like to know how to get, at runtime, the configuration file (xml) and the log file (the file where the logger writes the logs). I stop the application execution using a breakpoint and I’d like to be able, using quick watch window, to get those parameters.
Thanks for help.
Personally, I think you might be going the wrong way about this as you would be better to try to see how log4net is configured and from that determine where it logs the information.
The usual starting place is the app.config file, which may contain the log4net configuration itself, or a reference to another external file, but configuation can also be done entirely at runtime, so there is no guarantee that there even is a config file, but you could try looking at
which may show you where the config file is located.
The filename is tricker, because