A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cnelsonakgov/serilog-sinks-azureapp below:

cnelsonakgov/serilog-sinks-azureapp: A Serilog sink that supports Azure App Services 'Diagnostics logs' and 'Log stream' features.

Serilog.Sinks.AzureApp

A Serilog sink that supports Azure App Services 'Diagnostics logs' and 'Log stream' features.

Write Serilog events to Azure Diagnostics Application Logging using Microsoft.Extensions.Logging and Microsoft.Extensions.Logging.AzureAppServices. Enables using the the Azure Log Stream and Blob storage for events.

Designed to be used with Serilog.AspNetCore. Works with UseSerilog().

To add Serilog:

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

In Program.cs:

Add reference and update the Main method:

using Serilog;

[...]

Log.Logger = new LoggerConfiguration()
    .Enrich.FromLogContext()
    .WriteTo.Console()
    .CreateLogger();

[...]

Host.CreateDefaultBuilder(args)
    .UseSerilog()
    .ConfigureWebHostDefaults(webBuilder =>
    {
        webBuilder.UseStartup<Startup>();
    });

Diagnostic logs and log stream are configured in the Azure App Service's Monitoring section.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4