4

These are default fields

{
  "name": "myapp",
  "hostname": "banana.local",
  "pid": 40161,
  "level": 30,
  "msg": "hi",
  "time": "2013-01-04T18:46:23.851Z",
  "v": 0
}

How can I remove hostname, pid from json output or use bunyan pretty output tool to hide those fields?

hong4rc
  • 3,999
  • 4
  • 21
  • 40
Pablo
  • 28,133
  • 34
  • 125
  • 215

1 Answers1

0

Per the author, it isn't officially supported but you can delete them manually with this. See the post for potential pitfalls.

delete logger.fields.hostname;
geg
  • 4,399
  • 4
  • 34
  • 35