tslog
tslog copied to clipboard
Bug: [BUG]
Describe the bug
I'm getting below error when I log as below
const reqBody = await event.request.formData(); log.info(reqBody)
event is https://kit.svelte.dev/docs/types#public-types-requestevent. but it works fine if I do log.info(JSON.stringify(reqBody))
TypeError Cannot read properties of undefined (reading 'reduce') error stack: • undici [nodejs.util.inspect.custom] internal/deps/undici/undici:4887 • inspect formatValue internal/util/inspect:806 • inspect inspect internal/util/inspect:365 • inspect formatWithOptionsInternal internal/util/inspect:2304 • inspect formatWithOptions internal/util/inspect:2166 • index.js Object.transportFormatted /node_modules/.pnpm/[email protected]/node_modules/tslog/dist/esm/runtime/nodejs/index.js:107 • BaseLogger.js Logger.log /node_modules/.pnpm/[email protected]/node_modules/tslog/dist/esm/BaseLogger.js:101 • index.js Logger.info /node_modules/.pnpm/[email protected]/node_modules/tslog/dist/esm/index.js:26 •
• task_queues process.processTicksAndRejections internal/process/task_queues:95
Screenshots
Additional context Add any other context about the problem here.
Node.js Version v20.16.0
Same issue with Bun 1.1.21 as well.
OS incl. Version Ubuntu 24.04 LTS 6.8.0-39-generic