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", 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)