Skip to content

Commit

Permalink
🐛 Fix: multiline logs format
Browse files Browse the repository at this point in the history
  • Loading branch information
Molunerfinn committed Jun 27, 2020
1 parent 5e68220 commit 444a42f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ class Logger {
if (typeof item === 'object' && type === 'error') {
log += `\n------Error Stack Begin------\n${util.format(item.stack)}\n-------Error Stack End------- `
} else {
log += `${JSON.stringify(item)} `
if (typeof item === 'object') {
item = JSON.stringify(item)
}
log += `${item} `
}
})
log += '\n'
Expand Down

0 comments on commit 444a42f

Please sign in to comment.