Skip to content

Commit 444a42f

Browse files
committed
🐛 Fix: multiline logs format
1 parent 5e68220 commit 444a42f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/Logger.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ class Logger {
5959
if (typeof item === 'object' && type === 'error') {
6060
log += `\n------Error Stack Begin------\n${util.format(item.stack)}\n-------Error Stack End------- `
6161
} else {
62-
log += `${JSON.stringify(item)} `
62+
if (typeof item === 'object') {
63+
item = JSON.stringify(item)
64+
}
65+
log += `${item} `
6366
}
6467
})
6568
log += '\n'

0 commit comments

Comments
 (0)