Emit structured stdout logs and harden transaction handling

This commit is contained in:
Mohamad Ihsan
2026-11-23 23:12:42 +07:00
parent 7957bf5a64
commit 572444a114
30 changed files with 499 additions and 1012 deletions
+2 -4
View File
@@ -81,9 +81,7 @@ const loginPartnerUser = async (req, res, next) => {
// })}`
// );
console.log(
`${uniqueCode} [ REQUEST LOGIN-PARTNER-USER ]: ${JSON.stringify(result)}`
);
winston.logger.info(`${uniqueCode} [ REQUEST LOGIN-PARTNER-USER ]`);
// validate
let err = validationResult(req);
@@ -380,7 +378,7 @@ const loginTerminal = async (req, res, next) => {
// log info
winston.logger.info(
`${uniqueCode} [ RESPONSE LOGIN-TERMINAL ]: ${JSON.stringify(result)}`
`${uniqueCode} [ RESPONSE LOGIN-TERMINAL ] code=${result.code}`
);
return res.status(200).json(result);