add middleware writeLog

This commit is contained in:
joseph le 2023-09-29 11:10:03 +07:00
parent aa0249eb28
commit 47fcdd3219
1 changed files with 2 additions and 2 deletions

View File

@ -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+"]"
}
}
}