Use log.level if exists, translate stream to level, display level as col
This commit is contained in:
parent
14d35c7ec3
commit
09e732f78e
@ -52,7 +52,7 @@ const config = {
|
||||
width: 500,
|
||||
},
|
||||
{
|
||||
field: 'stream',
|
||||
field: 'level',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
@ -12,6 +12,15 @@ const parseEventData = (eventData) => {
|
||||
if (message) {
|
||||
json.message = message
|
||||
}
|
||||
let level;
|
||||
if (json.log && json.log.level) {
|
||||
level = json.log.level
|
||||
} else if (json.stream) {
|
||||
level = json.stream === 'stderr' ? 'error' : 'info'
|
||||
}
|
||||
if (level) {
|
||||
json.level = level
|
||||
}
|
||||
return json
|
||||
} catch (e) {
|
||||
console.error(e, eventData)
|
||||
|
Loading…
Reference in New Issue
Block a user