Given the following appsettings.json:
{
"Serilog" : {
"WriteTo" : [
{
"Name" : "File",
"Args" : {
"Path" : "Logs/Log.txt"
}
},
{
"Name" : "ApplicationInsights",
"Args" : {
"InstrumentationKey" : "xxxxxxxx"
}
}
]
}
}
How would I go about replacing “InstrumentationKey” using structured configuration variable substitution? I’ve tried:
- Serilog:WriteTo[@Name=“ApplicationInsights”]:Args:instrumentationKey
- Serilog:WriteTo[Name=“ApplicationInsights”]:Args:instrumentationKey
- Serilog:WriteTo[“ApplicationInsights”]:Args:instrumentationKey
- Serilog:WriteTo[1]:Args:instrumentationKey
… without success.