SerilogWeb.Mvc
0.1.3
dotnet add package SerilogWeb.Mvc --version 0.1.3
NuGet\Install-Package SerilogWeb.Mvc -Version 0.1.3
<PackageReference Include="SerilogWeb.Mvc" Version="0.1.3" />
paket add SerilogWeb.Mvc --version 0.1.3
#r "nuget: SerilogWeb.Mvc, 0.1.3"
// Install SerilogWeb.Mvc as a Cake Addin
#addin nuget:?package=SerilogWeb.Mvc&version=0.1.3
// Install SerilogWeb.Mvc as a Cake Tool
#tool nuget:?package=SerilogWeb.Mvc&version=0.1.3
Serilog classes (currently only action enrichers) for logging with ASP.NET MVC
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Microsoft.AspNet.Mvc (>= 5.2.0)
- Serilog (>= 1.5.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Beta release. Package dependencies changed to lower versions of MVC and Serilog.
Available Serilog enrichers:
MvcControllerActionMethodEnricher: Enrich with action method signature.
MvcControllerActionMethodEnricher: Enrich with action method signature.
MvcControllerActionNameEnricher: Enrich with action name.
MvcControllerNameEnricher: Enrich with controller name.
MvcControllerTypeEnricher: Enrich with controller type.
MvcControllerActionResultEnricher: Enrich with action result type (available after action execution in views etc.)
MvcControllerCustomEnricher: Make your own enricher as a lamda function based on data made available as arguments.
LoggerConfiguration loggerConfiguration = new LoggerConfiguration()
.Enrich.With(new MvcControllerCustomEnricher((contexts, logEvent, propertyFactory) =>
{
logEvent.AddPropertyIfAbsent(propertyFactory.CreateProperty("IsChildAction", contexts.ActionExecuting.IsChildAction));
}))