Skip to content

collector-bank/serilog-enrichers-azurewebapps

Repository files navigation

Serilog.Enrichers.AzureWebApps

Build status

Enrichers that add properties from Azure Web Apps environment variables.

To use the enrichers, first install the NuGet package:

Install-Package Collector.Serilog.Enrichers.AzureWebApps

Then, apply the enrichers to your LoggerConfiguration:

Log.Logger = new LoggerConfiguration()
    .Enrich.With<AzureWebAppsNameEnricher>()
    .Enrich.With<AzureWebJobsNameEnricher>()
    .Enrich.With<AzureWebJobsTypeEnricher>()
    // ...other configuration...
    .CreateLogger();

Included enrichers

The package includes:

  • AzureWebAppsNameEnricher - adds the name of the Azure WebApp the application runs within
  • AzureWebJobsNameEnricher - adds the name of the Azure WebJob (if the application is a WebJob)
  • AzureWebJobsTypeEnricher - adds the type name of the Azure WebJob (continuous or triggered)

About

Enrichers that adds properties from Azure Web Apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages