Skip to content

NLog LoggerProvider Options

Rolf Kristensen edited this page Oct 31, 2022 · 3 revisions

The NLog LoggerProvider for Microsoft Extension Logging (MEL) has several options:

NLog Extension Logging ver. 1.4.0 adds support for binding the option-properties to appsettings.json:

{
    "Logging": {
        "NLog": {
            "IncludeScopes": false,
            "ParseMessageTemplates": false,
            "CaptureMessageProperties": true
        }
    }
}

When using UseNLog() or AddNLog() then NLog Logging-Provider will automatically apply IConfiguration from Host-Builder.