Class HttpRequestIdEnricher
Enrich log events with a HttpRequestId GUID. Original source - https://github.com/serilog-web/classic/blob/master/src/SerilogWeb.Classic/Classic/Enrichers/HttpRequestIdEnricher.cs Nupkg: 'Serilog.Web.Classic' contains handlers and extra bits we do not want
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Logging.Serilog.Enrichers
Assembly: Umbraco.Infrastructure.dll
Syntax
public class HttpRequestIdEnricher : ILogEventEnricher
Constructors
View SourceHttpRequestIdEnricher(IRequestCache)
Declaration
public HttpRequestIdEnricher(IRequestCache requestCache)
Parameters
Type | Name | Description |
---|---|---|
IRequestCache | requestCache |
Fields
View SourceHttpRequestIdPropertyName
The property name added to enriched log events.
Declaration
public const string HttpRequestIdPropertyName = "HttpRequestId"
Field Value
Type | Description |
---|---|
System.String |
Methods
View SourceEnrich(LogEvent, ILogEventPropertyFactory)
Enrich the log event with an id assigned to the currently-executing HTTP request, if any.
Declaration
public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | logEvent | The log event to enrich. |
ILogEventPropertyFactory | propertyFactory | Factory for creating new properties to add to the event. |