Open sandboxFocus

Method WithAdditionalProperty

WithAdditionalProperty<T>(string, T, in LoggingPropertyOptions)

Returns a LogEventData that augments the current one with an additional property, but does not change the expression model.

Declaration
public LogEventData WithAdditionalProperty<T>(string propertyName, T propertyValue, in LoggingPropertyOptions options = default)
Parameters
Type Name Description
string propertyName

The name of the additional property.

T propertyValue

The value of the additional property.

LoggingPropertyOptions options

The options of the additional property.

Returns
Type Description
LogEventData

A LogEventData that includes the additional property.

Type Parameters
Name Description
T

The type of the property value.