Skip to content

Conversation

giftig
Copy link
Contributor

@giftig giftig commented Dec 5, 2015

Add a field to LogBackend which specifies a ColorConfig
If using colour, ensure that we use the value for the corresponding
level in the backend's ColorConfig if specified, falling back to the
default colors.

Expose the colour constants found in log_nix.go so that applications can
reference them in specifying their own colour config.

Add a new ConvertColors func to log_nix as a convenient way of
converting a list of numbers representing ansi codes into the strings
needed, without having to wrap each one in colorSeq or colorSeqBold
individually.

Also expose ColorSeq and ColorSeqBold to enable individual levels to
be easily set bold or otherwise if that behaviour is desired, however.

Relates to #63

Add a field to LogBackend which specifies a ColorConfig
If using colour, ensure that we use the value for the corresponding
level in the backend's ColorConfig if specified, falling back to the
default colors.

Expose the colour constants found in log_nix.go so that applications can
reference them in specifying their own colour config.

Add a new ConvertColors func to log_nix as a convenient way of
converting a list of numbers representing ansi codes into the strings
needed, without having to wrap each one in colorSeq or colorSeqBold
individually.

Also expose ColorSeq and ColorSeqBold to enable individual levels to
be easily set bold or otherwise if that behaviour is desired, however.
@op
Copy link
Owner

op commented Feb 6, 2016

@giftig thanks for your time! I'm a bit hesitant to expose all of this without having thought it through for Windows. But now with vendoring in Go it should be possible to fix it since it's such an advance use case. Thanks!

op added a commit that referenced this pull request Feb 6, 2016
Support customisation of default colours in unix
@op op merged commit 0882c9a into op:master Feb 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants