Skip to content

Enriches Serilog log events by adding exception properties when the log event includes an exception.

Notifications You must be signed in to change notification settings

NightWatchman/Serilog.Enrichers.ExceptionProperties

Repository files navigation

Serilog.Enrichers.ExceptionProperties

Enriches Serilog events with Exception properties when Exceptions are logged. The included properties are Message, Stacktrace, and InnerException.Message. They are enhanced as Exception, Stacktrace, and InnerException properties respectively.

To use the enricher, first install the NuGet package:

Install-Package Serilog.Enrichers.ExceptionProperties

Then, apply the enricher to your LoggerConfiguration:

Log.Logger = new LoggerConfiguration()
  .Enrich.WithExceptionProperties()
  // ...other configuration...
  .CreateLogger();

Copyright (c) Eric Rushing 2022 - Provided under the Apache License, Version 2.0.

About

Enriches Serilog log events by adding exception properties when the log event includes an exception.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages