I'm using log4net in C# Win Form App and I have start/stop toggle button -
When I click "start" the log4net config are loaded and the log file is created - That is working.
But now I want to add the option to click "stop" button, for stopping the logger and of course release the file so I could open it with openFileDialog
that I have in my app for reading the log file text with StreamReader
to show the log file on a multiline textbox
.
You can modify the Threshold
during runtime. To stop logging set it to Off
. I have already shown how this works in this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With