Custom attribute that, when applied on a field or property, causes PostSharp to implement tracing when its value changes.
Implements
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Module|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = true, Inherited = false)]
[MulticastAttributeUsage(MulticastTargets.Field|MulticastTargets.Property, TargetMemberAttributes = MulticastAttributes.NonAbstract|MulticastAttributes.UserGenerated, AllowMultiple = false)]
[Metric("UsedFeatures", "Patterns.Diagnostics.Logging")]
[ProvideAspectRole("Tracing")]
public class LogValueAttribute : LocationLevelAspect, ILocationLevelAspect, ILocationLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ILogValueAspect, IAspect
Remarks
By default, the current custom attribute follows the settings of the default profile, which adds a Debug message. You can change these default settings by choosing a different logging profile.
Constructors
Name | Description |
---|---|
LogValueAttribute() | Initializes a new LogValueAttribute for the default profile. |
LogValueAttribute(string) | Initializes a new LogValueAttribute and specifies a profile name. |
Properties
Name | Description |
---|---|
ProfileName | Gets or sets the name of the LoggingProfile. |