From c8a7f3236c010584659412334e64d8f81bf71653 Mon Sep 17 00:00:00 2001 From: Noel Forte Date: Thu, 5 Dec 2024 22:53:57 -0500 Subject: [PATCH] fix `debug` logging an EleventyError incorrectly replace unformatted, escaped string output from util.inspect with debug's own `%O` object pretty-print --- src/Errors/EleventyErrorHandler.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Errors/EleventyErrorHandler.js b/src/Errors/EleventyErrorHandler.js index 36a4838a6..bd3d64830 100644 --- a/src/Errors/EleventyErrorHandler.js +++ b/src/Errors/EleventyErrorHandler.js @@ -1,4 +1,3 @@ -import util from "node:util"; import debugUtil from "debug"; import ConsoleLogger from "../Util/ConsoleLogger.js"; @@ -77,7 +76,7 @@ class EleventyErrorHandler { //https://nodejs.org/api/process.html log(e, type = "log", chalkColor = "", forceToConsole = false) { if (process.env.DEBUG) { - debug("Full error object: %o", util.inspect(e, { showHidden: false, depth: null })); + debug("Full error object: %O", e); } let showStack = true;