Open sandboxFocus

Class LogAttribute

Custom attribute that, when applied on a method, causes PostSharp to implement tracing before and after execution of this method.

Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class LogAttribute : LogAttributeBase, IMethodLevelAspect, IMethodLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ILogAspect, IAspect
Remarks

By default, the current custom attribute follows the settings of the default profile, which adds a Debug message on entry and on success, and a Warning on exception. All messages include parameter values. You can change these default settings by setting the properties of this class, or by choosing a different logging profile. The values set to properties in this class override the values set by the logging profile.

Constructors

Name Description
LogAttribute()

Initializes a new LogAttribute.

LogAttribute(string)

Initializes a new LogAttribute and specifies a logging profile.