Specifies the behavior of logging properties (exposed by LogEventData), such as IsRendered, IsInherited or IsBaggage.
Namespace: PostSharp.Patterns.Diagnostics.Custom
Assembly: PostSharp.Patterns.Common.dll
Syntax
public readonly struct LoggingPropertyOptions
Constructors
Name | Description |
---|---|
LoggingPropertyOptions(bool, bool, bool, bool, IFormatter) | Initializes a new LoggingPropertyOptions. |
Properties
Name | Description |
---|---|
Formatter | Gets the formatter to be used to render the property value. |
IsBaggage | Determines whether the property is cross-process. The default value is |
IsIgnored | Determines whether this property must be ignored by the VisitProperties<TVisitorState>(object, ILoggingPropertyVisitor<TVisitorState>, ref TVisitorState, in LoggingPropertyVisitorOptions) method. This value is typically only returned by GetPropertyOptions(string) to say that a property of the raw CLR object must not be exposed as a logging property. |
IsInherited | Determines whether the property is inherited from the parent activity to children activities and messages. The default value is |
IsRendered | Determines whether the property will be included in the log message. The default value is |
Methods
Name | Description |
---|---|
WithFormatter(IFormatter) | Returns a copy of the current LoggingPropertyOptions but with a different value of the Formatter property. |
WithIsBaggage(bool) | Returns a copy of the current LoggingPropertyOptions but with a different value of the IsBaggage property. |
WithIsIgnored(bool) | Returns a copy of the current LoggingPropertyOptions but with a different value of the IsIgnored property. |
WithIsInherited(bool) | Returns a copy of the current LoggingPropertyOptions but with a different value of the IsInherited property. |
WithIsRendered(bool) | Returns a copy of the current LoggingPropertyOptions but with a different value of the IsRendered property. |