Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "tiny" output for CLI #389

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add "tiny" output for CLI #389

wants to merge 2 commits into from

Conversation

esanai
Copy link

@esanai esanai commented Apr 6, 2016

This option outputs log message only. It is minimal output option.

... | bunyan -o tiny

Less is more.

This option '-o tiny' outputs message only. It is minimal output.
onelineMsg = ' ' + stylize(rec.msg, 'cyan');
var onelineMsg = '';
if (!tiny) {
if (rec.msg.indexOf('\n') !== -1) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not do this as:

if (tiny) {
  ...
} else if (rec.msg.indexOf('\n') !== -1) {

rather than indenting all of the existing if:s one extra step?

@voxpelli
Copy link

voxpelli commented Apr 6, 2016

I like the idea of a more compact output so that one can get a good overview of all of ones error message, even at the most verbose log levels, without it getting too unwieldy because of all of the attached data.

I'm currently logging a couple of API responses and they can get a bit too verbose.

@voxpelli
Copy link

This is pretty much solved by #407 which was merged and released as part of 1.8.5. It outputs message and log level when using -o simple.

@nblasgen
Copy link

I prefer the idea of custom templates, similar to #191 .. addresses multiple open issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants