Bunyan formatting options

1,533 views
Skip to first unread message

Sam Placette

unread,
Jul 3, 2013, 10:34:31 AM7/3/13
to bunyan-...@googlegroups.com
Hi,

I'm using Bunyan and I'm quite pleased with it. I have a question about formatting options: 

When I use a file stream, Bunyan writes every log entry on a separate line, which I like because it allows me to visually scan several log statements at a time. I just connected Bunyan to the stdout stream and it now allocates a separate line to every property of the logged message. I can see how this pretty indented output could be useful, but I prefer the log message to be on a single line, the way it's done for file streams. Is there any option or configuration to change the way messages are formatted?

Apologies if this is covered in the docs - I searched in both the docs and the source code and couldn't find an answer.

Thanks in advance
Sam Placette

Trent Mick

unread,
Jul 3, 2013, 2:59:21 PM7/3/13
to Sam Placette, bunyan-...@googlegroups.com
Hi Sam,

Could you show me actual examples with the code and/or `bunyan` command line options you are using. Raw bunyan output to stdout/stderr/file/any stream should always be a single line (of JSON) for each log record. IOW, I'm not sure what you are hitting here.

Trent
--
Trent Mick

Sam Placette

unread,
Jul 3, 2013, 3:58:18 PM7/3/13
to Trent Mick, bunyan-...@googlegroups.com
Trent, you are correct (I know I messaged you offline earlier but wanted to reply on forum too so others could see this).

Here's what I missed: the app I'm working on uses the Bunyan formatter (at https://github.com/trentm/node-bunyan/blob/master/bin/bunyan) to filter / display the raw log output. Bunyan's formatter has lots of options for configuring how the output is formatted / displayed, and I was able to configure it pretty quickly once I determined that was responsible for formatting the output.

Thanks for the help.
Sam
Reply all
Reply to author
Forward
0 new messages