Class ILambdaSharpLoggerEx
ILambda
Inheritance
Namespace: LambdaSharp.Logging.Events
Assembly: LambdaSharp.Logging.dll
Syntax
public static class ILambdaSharpLoggerEx
Methods
LogEvent<T>(ILambdaSharpLogger, String, T, IEnumerable<String>)
Send a CloudWatch event with optional event details and resources it applies to. This event is forwarded to the configured EventBridge. The 'detail-type' property is set to the full type name of the detail value.
Declaration
public static void LogEvent<T>(this ILambdaSharpLogger logger, string source, T detail, IEnumerable<string> resources = null)
Parameters
Type | Name | Description |
---|---|---|
ILambda |
logger | The ILambda |
System. |
source | Name of the event source. |
T | detail | Data-structure to serialize as a JSON string. If value is already a , it is sent as-is. There is no other schema imposed. The data-structure may contain fields and nested subobjects.
|
System. |
resources | Optional AWS or custom resources, identified by unique identifier (e.g. ARN), which the event primarily concerns. Any number, including zero, may be present. |
Type Parameters
Name | Description |
---|---|
T |
LogEvent<T>(ILambdaSharpLogger, String, String, T, IEnumerable<String>)
Send a CloudWatch event with optional event details and resources it applies to. This event is forwarded to the configured EventBridge.
Declaration
public static void LogEvent<T>(this ILambdaSharpLogger logger, string source, string detailType, T detail, IEnumerable<string> resources = null)
Parameters
Type | Name | Description |
---|---|---|
ILambda |
logger | The ILambda |
System. |
source | Name of the event source. |
System. |
detailType | Free-form string used to decide what fields to expect in the event detail. |
T | detail | Data-structure to serialize as a JSON string. If value is already a , it is sent as-is. There is no other schema imposed. The data-structure may contain fields and nested subobjects.
|
System. |
resources | Optional AWS or custom resources, identified by unique identifier (e.g. ARN), which the event primarily concerns. Any number, including zero, may be present. |
Type Parameters
Name | Description |
---|---|
T |