mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-27 22:59:51 -05:00
parent
10433438d0
commit
7e5227e4a1
1 changed files with 5 additions and 1 deletions
|
@ -42,8 +42,12 @@ module.exports.setup = function(logs) {
|
|||
Logger.emit('error', err)
|
||||
})
|
||||
stream.write = function(obj) {
|
||||
if (target.format === 'pretty') {
|
||||
dest.write(print(obj.level, obj.msg, obj, false) + '\n')
|
||||
} else {
|
||||
dest.write(JSON.stringify(obj, Logger.safeCycles()) + '\n')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Error('wrong target type for a log')
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue