how to edit the nlog config file programmatically
问题 i am trying to edit the logging level in the config file programmaticly. foreach (var rule in LogManager.Configuration.LoggingRules) { if (m_loginglevelcomboBox.SelectedItem.ToString() == "Debug") { rule.EnableLoggingForLevel(LogLevel.Debug); } else { rule.EnableLoggingForLevel(LogLevel.Info); } } //LogManager.ReconfigExistingLoggers(); I am not interested in calling the Reconfig,as the changes will affect the application on the fly. I want the changes to be made when the application is