-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the way for combining appsettings.json with nlog.config #265
Comments
NLog.Extension.Logging ver. 1.6.0 inludes #344 that improves on this by adding these extensions methods to ILoggerBuilder: public static ILoggingBuilder AddNLog(this ILoggingBuilder builder, LoggingConfiguration configuration)
public static ILoggingBuilder AddNLog(this ILoggingBuilder builder, string configFileRelativePath) They have the special behavior, that they assign/load the NLog-config AFTER having registered Ground work is also being prepared for creating a fluent-config-api for the NLog LogFactory. See also NLog/NLog#3686 (Making |
Made a small step with #418 and NLog/NLog.Web#540 (Waiting for NLog 4.7.1) |
NLog.Web.AspNetCore ver 4.9.3 has been released, and now you can do this:
That replaces the old style:
|
Right now one one have to reload NLog.config twice. When loading NLog as first thing at startup like this:
Because ConfigSetting is not initially available:
Could be nice if we could have a more fluent interface. Maybe like this:
See also NLog/NLog#3097 and see also https://github.com/NLog/NLog/wiki/Reinitialize-NLog-configuration
The text was updated successfully, but these errors were encountered: