Class LambdaErrorReportGenerator
The Lambda
Inheritance
Implements
Namespace: LambdaSharp.Logging.ErrorReports
Assembly: LambdaSharp.Logging.dll
Syntax
public class LambdaErrorReportGenerator : ILambdaErrorReportGenerator
Constructors
LambdaErrorReportGenerator(String, String, String, String, String, String, String, String, String, String)
Creates a new Lambda
Declaration
public LambdaErrorReportGenerator(string moduleId, string moduleInfo, string platform, string functionId, string functionName, string appId, string appName, string framework, string gitSha, string gitBranch)
Parameters
Type | Name | Description |
---|---|---|
System. |
moduleId | The stack name of the deployed LambdaSharp module. |
System. |
moduleInfo | The LambdaSharp module name and version. |
System. |
platform | The platform running the code. |
System. |
functionId | The ID of the deployed Lambda function. |
System. |
functionName | The Lambda function name. |
System. |
appId | The ID of the deployed app. |
System. |
appName | The app name. |
System. |
framework | The Lambda execution framework. |
System. |
gitSha | An optional git SHA. |
System. |
gitBranch | An optional git branch name. |
Methods
CreateReport(String, String, Exception, String, Object[])
The Create
Declaration
public LambdaErrorReport CreateReport(string requestId, string level, Exception exception, string format = null, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System. |
requestId | The AWS request ID. |
System. |
level | The severity level of the error report. |
System. |
exception | An optional exception instance. |
System. |
format | An optional message. |
System. |
args | Optional arguments for the error message. |
Returns
Type | Description |
---|---|
Lambda |
A new Lambda |
Remarks
See args
parameter
impacts the processing of the format
parameter.
FormatMessage(String, Object[])
The Formatformat
parameter is not null
and the args
parameter is non-empty.
If the format
parameter is null
, this method returns null
. If the args
parameter is empty,
this method return the value of the format
parameter.
Declaration
public static string FormatMessage(string format, object[] args)
Parameters
Type | Name | Description |
---|---|---|
System. |
format | An optional message. |
System. |
args | Optional arguments for the error message. |
Returns
Type | Description |
---|---|
System. |
The formatted string. |