new ErrorLog(args, …stringArgsParams)
Creates a new instance of the ErrorLog class.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
args |
Object | The error log parameters. |
|
stringArgsParams |
string |
<repeatable> |
Additional string parameters. |
- Source:
Throws:
-
If the creation of error log fails.
- Type
- Error
Methods
append(append, …params) → {ErrorLog}
Appends additional error information to the error log.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
append |
Object | string | The error object or string to append. |
|
params |
string |
<repeatable> |
Additional parameters for error information. |
- Source:
Returns:
- The ErrorLog instance with appended information.
- Type
- ErrorLog
consolePrint() → {ErrorLog}
Prints the error log to the console.
- Source:
Returns:
- The ErrorLog instance for method chaining.
- Type
- ErrorLog
response() → {Object}
Generates a response object representing the error log.
- Source:
Returns:
- The response object containing error details.
- Type
- Object
(async) saveLog() → {Promise.<ErrorLog>}
Asynchronously saves the error log to the database.
- Source:
Throws:
-
If there is an error during the saving process.
- Type
- Error
Returns:
- A promise resolving to the saved ErrorLog instance.
- Type
- Promise.<ErrorLog>