- A Graylog instance running to send logs to, which should be running a GELF UDP input.
- A .NET Core application to send logs from.
- An Azure App Service to host the above application.
First, add the following packages to your application:
Next, add the following to
Program.cs, at the bottom of the CreateDefaultBuilder method:
Next, configure the
appsettings.jsonfile, cleaning the existing Logging config and adding the following:
Do this for the
appsettings.Development.json file to allow console logging when in Development:
Testing the application locally, check to see that you have console logging activated.
Once working, deploy the application to your Azure App Service and verify logs are being sent to Graylog.
To change the Application name, set the “Serilog:Properties:Application” configuration value.