Update logs at startup
MODIFY
src/start.ts
src/start.ts
@@ -99,9 +99,9 @@ export default class Bootstrap {
console.log('Unhandled Rejection: ', p, ' reason: ', reason);
void Logging.logError({
tenantID: Constants.DEFAULT_TENANT,
- action: ServerAction.BOOTSTRAP_STARTUP,
+ action: ServerAction.UNKNOWN_ACTION,
module: MODULE_NAME, method: 'start',
- message: `Reason: ${(reason ? reason.message : 'Not provided')}`,
+ message: `Unhandled Rejection: ${(reason ? (reason.message ?? reason) : 'Not provided')}`,
detailedMessages: (reason ? reason.stack : null)
});
});
@@ -233,7 +233,7 @@ export default class Bootstrap {
console.error(chalk.red(error));
await Logging.logError({
tenantID: Constants.DEFAULT_TENANT,
- action: ServerAction.BOOTSTRAP_STARTUP,
+ action: ServerAction.STARTUP,
module: MODULE_NAME, method: 'startServersListening',
message: `Unexpected exception in ${serverStarted.join(', ')}: ${error.toString()}`,
detailedMessages: { error: error.stack }

Update logs at startup