clux / loggerv

A minimalistic stdout/stderr logger for rust
https://docs.rs/loggerv
MIT License
21 stars 6 forks source link

using predefined colors #19

Closed jpastuszek closed 5 years ago

jpastuszek commented 5 years ago

Using predefined colors instead of Fixed by default has better compatibility. This change fixes an issue with Jenkins (via plugin) not being able to colorize the output.

jpastuszek commented 5 years ago

Perhaps this can be fixed; it is not working by default. Another point behind this change is that people use terminals with different color schemes and this schemes redefine some predefined colors in such a way that they are all visible and contrasting enough but have some special palette etc.. So if you fix colors your text may not be visible/contrasting enough on this terminals. See also: https://unix.stackexchange.com/questions/105568/how-can-i-list-the-available-color-names "If you want this to be properly portable, you should rely only on the eight standard ANSI colors".

clux commented 5 years ago

Yeah, some people do. It's a small set of people from my experience of looking at devs monitors though. I'd rather have a nicer default for most people than to account for the odd person who distort the colors completely (they'll have further issues anyway). But this is a bit of a damned if you do, damned if you don't type of scenario. The 8 standard colors look awful on an unstyled terminal.

Checked on jenkins. It certainly works if you set "Color ANSI Console Output" and set "ANSI color map" to a standard value like "xterm". The AnsiColor plugin is needed, but it's pretty common.

jpastuszek commented 5 years ago

OK, I have old version of the plugin and in next release they have #96: Added support for xterm 256 colors and 24 bit colors - @JoeMerten.. I accept your arguments, thanks for the discussion.