Skip to content

Commit

Permalink
fix: rollback error plainifying in log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Oct 19, 2024
1 parent c3dcb07 commit 46b49bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/common/log/log-memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 46b49bb

Please sign in to comment.