Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a WCF Service in which Nlog is used for logging. The requirement is to enable/disable Nlog logging programmatically. For doing this I have used EnableLogging() and DisableLogging() functions. The problem which I am facing is, state of logging is getting changed only on app pool recycle. Can app pool recycle be avoided when using EnableLogging() and DisableLogging() functions?
Posted
Updated 29-Sep-15 1:35am
v2
Comments
sashje- 30-Sep-15 4:00am    
Read https://github.com/NLog/NLog/wiki/Internal-Logging#enabling-internal-logging-programmatically

If you use a config file, changes are not read before the app restarts.. But if you do this programmatically, you should be able to do the changes with immediate effect

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900