Merged in fix/logging-warmup-background (pull request #3235)
Fix/logging warmup background * fix: logging in background functions * fix logging * fix logging * fix logging * fix: add error logging when unable to get from cache * Merge branch 'master' of bitbucket.org:scandic-swap/web into fix/logging-warmup-background Approved-by: Linus Flood
This commit is contained in:
committed by
Linus Flood
parent
4174d43e16
commit
c4de9a2262
@@ -14,6 +14,16 @@ function getLogValue(args: unknown[]): Record<string, unknown> | undefined {
|
||||
return (args[0] as Record<string, unknown>) ?? undefined
|
||||
}
|
||||
if (args.length === 1) {
|
||||
if (args[0] instanceof Error) {
|
||||
return {
|
||||
error: {
|
||||
message: args[0].message,
|
||||
stack: args[0].stack,
|
||||
name: args[0].name,
|
||||
cause: String(args[0].cause),
|
||||
},
|
||||
}
|
||||
}
|
||||
return { value: args[0] }
|
||||
}
|
||||
return flatten(args)
|
||||
|
||||
Reference in New Issue
Block a user