Class HttpSessionIdEnricher
Enrich log events with the HttpSessionId property. Original source - https://github.com/serilog-web/classic/blob/master/src/SerilogWeb.Classic/Classic/Enrichers/HttpSessionIdEnricher.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 HttpSessionIdEnricher : ILogEventEnricher
Constructors
View SourceHttpSessionIdEnricher(ISessionIdResolver)
Declaration
public HttpSessionIdEnricher(ISessionIdResolver sessionIdResolver)
Parameters
Type | Name | Description |
---|---|---|
ISessionIdResolver | sessionIdResolver |
Fields
View SourceHttpSessionIdPropertyName
The property name added to enriched log events.
Declaration
public const string HttpSessionIdPropertyName = "HttpSessionId"
Field Value
Type | Description |
---|---|
System.String |
Methods
View SourceEnrich(LogEvent, ILogEventPropertyFactory)
Enrich the log event with the current ASP.NET session id, if sessions are enabled.
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. |