C# Class Serilog.Core.Enrichers.PropertyEnricher

Adds a new property encricher to the log event.
Inheritance: ILogEventEnricher
Exibir arquivo Open project: serilog/serilog

Public Methods

Method Description
Enrich ( LogEvent logEvent, ILogEventPropertyFactory propertyFactory ) : void

Enrich the log event.

PropertyEnricher ( string name, object value, bool destructureObjects = false ) : System

Create a new property enricher.

Method Details

Enrich() public method

Enrich the log event.
public Enrich ( LogEvent logEvent, ILogEventPropertyFactory propertyFactory ) : void
logEvent Serilog.Events.LogEvent The log event to enrich.
propertyFactory ILogEventPropertyFactory Factory for creating new properties to add to the event.
return void

PropertyEnricher() public method

Create a new property enricher.
public PropertyEnricher ( string name, object value, bool destructureObjects = false ) : System
name string The name of the property.
value object The value of the property.
destructureObjects bool If true, and the value is a non-primitive, non-array type, /// then the value will be converted to a structure; otherwise, unknown types will /// be converted to scalars, which are generally stored as strings.
return System