Class LoggingAspect
Logging Aspect Scope.Global is singleton
Implements
Inherited Members
Namespace: AWS.Lambda.Powertools.Logging.Internal
Assembly: AWS.Lambda.Powertools.Logging.dll
Syntax
public class LoggingAspect : IMethodAspectHandler
Constructors
LoggingAspect(ILogger)
Initializes a new instance of the LoggingAspect class.
Declaration
public LoggingAspect(ILogger logger)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogger | logger |
Methods
OnEntry(AspectEventArgs)
Entry point for the aspect.
Declaration
public void OnEntry(AspectEventArgs eventArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| AspectEventArgs | eventArgs |
OnException(AspectEventArgs, Exception)
When the method throws an exception, this method is called.
Declaration
public void OnException(AspectEventArgs eventArgs, Exception exception)
Parameters
| Type | Name | Description |
|---|---|---|
| AspectEventArgs | eventArgs | |
| Exception | exception |
OnExit(AspectEventArgs)
WHen the method exits, this method is called even if it throws an exception.
Declaration
public void OnExit(AspectEventArgs eventArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| AspectEventArgs | eventArgs |
OnSuccess(AspectEventArgs, object)
When the method returns successfully, this method is called.
Declaration
public void OnSuccess(AspectEventArgs eventArgs, object result)
Parameters
| Type | Name | Description |
|---|---|---|
| AspectEventArgs | eventArgs | |
| object | result |