mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
parent
10433438d0
commit
7e5227e4a1
@ -42,7 +42,11 @@ module.exports.setup = function(logs) {
|
|||||||
Logger.emit('error', err)
|
Logger.emit('error', err)
|
||||||
})
|
})
|
||||||
stream.write = function(obj) {
|
stream.write = function(obj) {
|
||||||
dest.write(JSON.stringify(obj, Logger.safeCycles()) + '\n')
|
if (target.format === 'pretty') {
|
||||||
|
dest.write(print(obj.level, obj.msg, obj, false) + '\n')
|
||||||
|
} else {
|
||||||
|
dest.write(JSON.stringify(obj, Logger.safeCycles()) + '\n')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error('wrong target type for a log')
|
throw new Error('wrong target type for a log')
|
||||||
|
Loading…
Reference in New Issue
Block a user