From 46b49bbd7dc141bde523a1fb7b04024c9ec621d9 Mon Sep 17 00:00:00 2001 From: Dirk Holtwick Date: Sat, 19 Oct 2024 13:21:58 +0200 Subject: [PATCH 1/2] fix: rollback error plainifying in log messages --- src/common/log/log-memory.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/log/log-memory.ts b/src/common/log/log-memory.ts index 2124fd6..3c50792 100644 --- a/src/common/log/log-memory.ts +++ b/src/common/log/log-memory.ts @@ -16,9 +16,10 @@ export function LoggerMemoryHandler( errorTrace?: boolean limit?: number maxDepth?: number + keepAsIs?: (v: any) => boolean }, ): LogHandler { - const { level = undefined, filter = undefined, compact = false, messages = [], errorTrace = false, maxDepth = 20 } = opt + const { level = undefined, filter = undefined, compact = false, messages = [], errorTrace = false, maxDepth = 20, keepAsIs } = opt const matchesNamespace = useNamespaceFilter(filter) const matchesLevel = useLevelFilter(level) @@ -35,7 +36,7 @@ export function LoggerMemoryHandler( const m = objectPlain(msg, { maxDepth, errorTrace, - keepAsIs: v => (v instanceof Error) || (typeof ErrorEvent !== 'undefined' && v instanceof ErrorEvent), + keepAsIs, // : v => (v instanceof Error) || (typeof ErrorEvent !== 'undefined' && v instanceof ErrorEvent), }) if (compact === true) From d5b5b08e4ff813a74a5ca21037aa64c5954fc412 Mon Sep 17 00:00:00 2001 From: Dirk Holtwick Date: Sat, 19 Oct 2024 13:22:02 +0200 Subject: [PATCH 2/2] 0.25.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9063932..ac8b01c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeed", "type": "module", - "version": "0.25.2", + "version": "0.25.3", "description": "🌱 Simple foundation library", "author": { "name": "Dirk Holtwick",