From 8ed7e738ab1f4ee4dfab84f3d91b962ad3f5a39f Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Fri, 21 Mar 2025 13:59:40 +0700 Subject: [PATCH] bug fixed log --- .../modules/loadbalance/loadbalance.controller.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/application/modules/loadbalance/loadbalance.controller.js b/application/modules/loadbalance/loadbalance.controller.js index ee927e0..4ee8c7d 100644 --- a/application/modules/loadbalance/loadbalance.controller.js +++ b/application/modules/loadbalance/loadbalance.controller.js @@ -719,7 +719,7 @@ const loadingBalanceRequest = async (req, res) => { // await model.getReservationPendingWithFlag(card_number, now); winston.logger.warn( - `${uniqueCode} [ RESPONSE LOADING-BALANCE-REQUEST DEBUG 1 ]: ${JSON.stringify( + `${uniqueCode} [ RESPONSE LOADING-BALANCE-REQUEST DEBUG X ]: ${JSON.stringify( getReservationPendingWithFlagCounter )}` ); @@ -741,9 +741,17 @@ const loadingBalanceRequest = async (req, res) => { if (getReservationPendingWithFlagCounter.length > 0) { if (lastFlag) { - `${uniqueCode} [ RESPONSE LOADING-BALANCE-REQUEST DEBUG 4 ]: ${card_number}` + + winston.logger.warn( + `${uniqueCode} [ RESPONSE LOADING-BALANCE-REQUEST DEBUG Y ]: ${card_number}` + ); + if ((parseInt(lastFlag) <= parseInt(flag)) || (parseInt(lastFlag) == 255 && parseInt(flag) == 0)) { - `${uniqueCode} [ RESPONSE LOADING-BALANCE-REQUEST DEBUG 5 ]: ${card_number}` + + winston.logger.warn( + `${uniqueCode} [ RESPONSE LOADING-BALANCE-REQUEST DEBUG Z ]: ${card_number}` + ); + let reservationNumberPendingSuccessLoaded = []; let loadBalanceNumberPendingSuccessLoaded = []; let totalReservationAmount = 0;