cnelsonakgov / serilog-sinks-azureapp

A Serilog sink that supports Azure App Services 'Diagnostics logs' and 'Log stream' features.
Creative Commons Zero v1.0 Universal
17 stars 2 forks source link

Update installation process in README #13

Open tiaringhio opened 1 year ago

tiaringhio commented 1 year ago

Update installation process to reflect changes in required NuGet packages: I would like to point out the importance of having the Microsoft.Extensions.Logging and Microsoft.Extensions.Logging.AzureAppServices installed work the logging to work. I tried to deploy Serilog to a dev environment (Azure App Service hosted on IIS) and it broke because the aforementioned packages were not installed. The result was that the web app did not start (500 error). The following paragraph would be the updated version:

Installation

Attention: The following NuGet packages MUST be installed for Serilog to work in a production environment (Azure App Service)

If they are not installed the WebApp won't start and will throw a System.IO.FileNotFoundException (500 error).

Install the packages with the following commands, making sure to choose the right version for you application:

dotnet add package Microsoft.Extensions.Logging
dotnet add package Microsoft.Extensions.Logging.AzureAppServices

To add Serilog:

dotnet add package Serilog.AspNetCore
dotnet add package Serilog.Sinks.AzureApp