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

Already on GitHub? Sign in to your account

Remove backgrounds from log #6

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
6 participants

This removes the background from the log heading as well as the following log levels:

  • verbose
  • http
  • error

See npm/npm#5202. It is much more appealing on dark terminals that do not have a solid black background.

Member

domenic commented May 6, 2014

-1, I like how it looks as-is.

@isaacs isaacs referenced this pull request in npm/npm May 7, 2014

Closed

remove background color codes from output #5202

Owner

isaacs commented May 7, 2014

The background colors were added because they were requested by users who had a hard time seeing the colors on their default terminal setting.

You can say that it's their responsibility to configure your terminal. And maybe you're right. But I'd rather not teach people how to use their computers when it's easy to just accommodate their requests.

I'd like to see it more configurable. Also, I'd like to change npm to have a lot less output in general, so these colorful things would only be seen by folks who opt into them anyway.

Owner

isaacs commented May 7, 2014

Fwiw, I have a "dark terminal that does not have a solid black background", and I do prefer the black background behind the text. It make it seem more solid and contained in a way.

Totally understand. Everyone has his or her preference (guess I'm more in the minority on this issue). As far as being configurable, would that be something that you would want to be in npmconf? Or maybe a function in here that could remove them? Be happy to help in any way on it. :]

npm install

npm is the only command-line utility I use frequently which specifies background colours. npm has a broad audience, though, so unattractive-but-guaranteed-to-be-legible is a defensible default.

+1 for configurability if it allows background colours to be disabled.

Owner

isaacs commented May 7, 2014

@davidchambers Since you're configuring the black background to be grey anyway, and if npm really is the only tool you use that specifies background colors, why not configure your terminal to not show background colors at all?

That's certainly an option. If I ever switch from MacVim to terminal vim, though, I'll want background colours for the status line, so it's not optimal.

Owner

isaacs commented May 7, 2014

You could compile vim for 256 colors, and just set the 16 basic ANSI background colors.

OMG so bikeshedding... ;)

@davidchambers davidchambers and 1 other commented on an outdated diff Jul 2, 2014

log.style = {}
log.levels = {}
log.disp = {}
log.addLevel('silly', -Infinity, { inverse: true }, 'sill')
-log.addLevel('verbose', 1000, { fg: 'blue', bg: 'black' }, 'verb')
+log.addLevel('verbose', 1000, { fg: 'blue', }, 'verb')
@evanlucas

evanlucas Jul 2, 2014

Yea, that's horrible. Fixed.

What's the status of this PR?

Any ❤️ for this PR?

Contributor

othiym23 commented Oct 30, 2015

@davidchambers I think, having read this thread, the best solution would be to come up with a way to make the background configurable, rather than just setting it outright. If you were to add that, this would be in a better place to land. Thanks for your patience!

Configurable via what mechanism, @othiym23?

Owner

iarna commented Mar 16, 2016

@davidchambers, I think that's something a patcher would have to figure out. Currently configuration in this module is done via method calls, as npmlog is a singleton. Figuring out exactly what that'd look like is most of the work of preparing the PR.

I'm going to close this PR as we won't be accepting it as it is.

@iarna iarna closed this Mar 16, 2016

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