Hirosh Wickramasuriya
Hirosh Wickramasuriya

Reputation: 451

How to configure Nlog.config to pick configuration changes automatically at runtime

Each time the NLog file is modified (during the development time) with different target parameters such as layout, changes are not immediately reflected in the output. To see the affected result, I had to restart the IIS and re-run the web application.

How to configure the NLog.config to read the changes automatically?

Upvotes: 1

Views: 455

Answers (1)

Hirosh Wickramasuriya
Hirosh Wickramasuriya

Reputation: 451

NLog.config can be configured to read the configuration parameters each time the file is modified. Include the autoReload="true" parameter to the NLog.config file

<nlog autoReload="true">
	. . . 
</nlog> 

Reference : Refer the section Automatic reconfiguration

Upvotes: 1

Related Questions