Is it possible to set this Configuration key/value in Azure App Settings (or Environmental Vars?)
See original GitHub issueHi 👋
Give this serilog configuration k/v’s … can this be set in Azure’s App Settings or in Environmental Variables (which is what Azure does anyways):
Trying to set that Logentries token
value.
It’s the array, that’s confusing me…
e.g. appsettings.production.json
"Serilog": {
"WriteTo": [
{
"Name": "Console"
},
{
"Name": "Logentries",
"Args": {
"token": "SOME SECRET HERE",
"outputTemplate": "{Level:u3}: {Message:lj}{NewLine}{Exception}"
}
}
]
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Environment variables and app settings in Azure App Service
This reference shows the variables you can use or customize. App environment. The following environment variables are related to the app ...
Read more >Understand Azure App Configuration key-value store
Azure App Configuration stores configuration data as key-values. Key-values are a simple and flexible representation of application settings ...
Read more >Configuration with Azure App Services and ASP.NET Core
There are two (probably more) ways to switch config values based on the current environment when running on Azure. Using appsettings.json. The ...
Read more >Configure apps - Azure App Service
In App Service, app settings are variables passed as environment variables to the application code. For Linux apps and custom containers, App ......
Read more >Configure function app settings in Azure Functions
To add a setting in the portal, select New application setting and add the new key-value pair. Function app settings in the Azure...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @PureKrome 👋
Yes, it’s possible, although unfortunately it’s not an optimal process right now; I believe given your config above, the variable name will be something like:
Serilog:WriteTo:1:Args:token
where the1
is an index into theWRITETO
array. May need some exploration; I seem to recall there’s an example out there somewhere. HTH!For a reference: