In .NET you sometimes need configuration keys with dots. For example in logging configuration. .NET itself creates a sample like this (Microsoft.AspNetCore):
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
Is there a way to set this value with an environment variable?
I tried:
- Logging__LogLevel__Microsoft.AspNetCore
- Logging__LogLevel__MicrosoftAspNetCore
- Logging__LogLevel__Microsoft_AspNetCore
- Logging__LogLevel__Microsoft__AspNetCore
Nothing worked. I know that dots in environment variables are not allowed in Linux. But here Microsoft (.NET) dictates it.