chain pruning

This commit is contained in:
2025-03-15 00:20:33 -07:00
parent 14eeb57a0e
commit 62fedaafea
4 changed files with 148 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ const metaFormat = (meta: object) => {
const logFormat = printf(({ level, message, timestamp, stack, ...meta }) => {
const errorObj: Error = meta["error"] as Error;
if (errorObj) {
const stackStr = errorObj["stack"];
const stackStr = errorObj["stack"] ?? "";
return (
`${timestamp} [${level.toUpperCase()}]: ${message}` + // line 1
`${metaFormat(errorObj)}\n` + // metadata