Open sandboxFocus

Class LoggingPropertyOptionsAttribute

Specifies the options (LoggingPropertyOptions) of a logging property that is expressed as a public property of a CLR type.

Inheritance
LoggingPropertyOptionsAttribute
Namespace: PostSharp.Patterns.Diagnostics.Custom
Assembly: PostSharp.Patterns.Common.dll
Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class LoggingPropertyOptionsAttribute : Attribute
Remarks

Add this attribute to the properties of a type whose instances you pass as the logging properties of a message or an activity, for instance to make a property inherited by the child activities and messages, which you cannot do with an anonymous type. Properties without the attribute are not rendered, not inherited, and not carried across processes. The attribute is honored by the default LogEventMetadata; a custom LogEventMetadata determines the options of its properties itself.

Constructors

Name Description
LoggingPropertyOptionsAttribute()

Properties

Name Description
IsBaggage

Gets or sets a value indicating whether this property must be carried in cross-process requests.

IsIgnored

Gets or sets a value indicating whether this property is ignored, that is, it should not be mapped to a logging property.

IsInherited

Gets or sets a value indicating whether this property is inherited by child contexts.

IsRendered

Gets or sets a value indicating whether this property must be included in the message.

Methods

Name Description
ToOptions()

Converts the current attribute into a LoggingPropertyOptions.

See Also