From 47fcdd32196be8236f2544cd356ce0bd351a9c24 Mon Sep 17 00:00:00 2001 From: joseph le Date: Fri, 29 Sep 2023 11:10:03 +0700 Subject: [PATCH] add middleware writeLog --- app/utils/Logger.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/utils/Logger.ts b/app/utils/Logger.ts index 87b9a64..dd9e617 100644 --- a/app/utils/Logger.ts +++ b/app/utils/Logger.ts @@ -17,9 +17,9 @@ const shortenStringsInObject = (obj, maxLength) => { obj[key] = obj[key].substring(0, maxLength); } - if (Array.isArray(obj[key]) && obj[key].length > 20) { + if (Array.isArray(obj[key]) && obj[key].length > 10) { // Rút ngắn chuỗi lại maxLength ký tự - obj[key] = obj[key].slice(0,20) + obj[key] = "[Array:"+obj[key].length+"]" } } }