Skip to content

How to convert appsettings.json to (bicep) parameters.json file for logging? #10404

Answered by RyanHill-MSFT
siegfried01 asked this question in Q&A
Discussion options

You must be logged in to vote

Add your logging as a settings object notation to an app config object. Assuming dotnet, it would look something like this:

resource appSettings 'Microsoft.Web/sites/config@2021-02-01' = {
  name: '${appName}/appsettings'
  properties: {
    // 'APPINSIGHTS_INSTRUMENTATIONKEY': instrumentationKey
    // 'ApplicationInsights:InstrumentationKey': instrumentationKey
    'Logging:ApplicationInsights:Enabled': 'true'
    'Logging:ApplicationInsights:LogLevel': 'Information'
    'Logging:LogLevel:Default' : 'Error'
    'Logging.LogLevel:Microsoft' : 'Warning'
  }
}

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@brwilkinson
Comment options

@siegfried01
Comment options

@brwilkinson
Comment options

@dileepainivossl
Comment options

Answer selected by siegfried01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants