-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure Web App Settings not supported. #17
Comments
I found a work arround by reading the settings myself and then add them to the serilog configuration Program.cs
No I don't have to include secrets in the appsettings.json but add them as application settings in my Azure Api App. |
@YvonneArnoldus there is a section here on dealing with arrays in appsettings when overriding from environment or keyvault https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/index?view=aspnetcore-2.2#bind-an-array-to-a-class have you tried the |
I'm not sure how dealing with arrays in appsettings is going to help me make the ReadFrom.Configuration form Serilog work with Azure Apps Settings. Unless Azure Apps Settings works different from appsettings.json. At the moment it is not a problem for me any more because the work around I posted works fine for me, but it would be nice to also support Azure Apps Settings (not appsettings.json) for Event Hub Sink, because it does work for application insights |
I can confirm the same issue on .NET Core 3.1. |
Hi, Serilog:WriteTo:1:Args:serverUrl "Serilog": { |
Any updates on how to get this to work from appsettings.json file? On .NET 5 trying something like this:
|
If I put the connection string for the eventhub in appsettings.json my logs are written to eventhub, but when I put the connections string in the App Settings of the Azure Web App no logs are written.
I'm using .Net Core 2.2 and all the latest version of the Serilog Packages.
appsettings.json
Application settings
Program.cs
Note: This is .Net Core 2.2 and the WebHost.CreateDefaultBuilder(args) adds:
I prefer not to commit the Event Hub ConnectionString in to my source code because that is bad practice.
The text was updated successfully, but these errors were encountered: