question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to set this Configuration key/value in Azure App Settings (or Environmental Vars?)

See original GitHub issue

Hi 👋

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:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
nblumhardtcommented, Apr 21, 2018

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 the 1 is an index into the WRITETO array. May need some exploration; I seem to recall there’s an example out there somewhere. HTH!

0reactions
skomis-mmcommented, May 11, 2020
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found