Open sandboxFocus

Class LogExceptionAttribute

Custom attribute that, when applied on a method, causes PostSharp to implement tracing when an exception occurs in this method.

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

Using this custom attribute is strictly equivalent to using LogAttribute with the Exceptions profile and no other property set.

The Exceptions profile logs only method exceptions, with the Warning level. You can change its options in postsharp.config. See LoggingProfile.

Constructors

Name Description
LogExceptionAttribute()

Initializes a new instance of the LogExceptionAttribute class.

See Also