LoggingConfigurationElement.VariablesKey constant value = "Variables". This means that the correct configuration for the variable section should look like this:
{
"NLog": {
"Variables": {
"DefaultMinLevel": "Debug",
"DefaultTargetNames": "logfile"
}
}
What does not match the json schema https://www.schemastore.org/appsettings.json
This does not affect work in normal cases, because the default configuration providers are case-insensitive, but for case-sensitive providers it is misleading.