Skip to content

More cautious legacy_color conversion in Logging#53280

Merged
KristofferC merged 1 commit intoJuliaLang:masterfrom
tecosaur:more-careful-face-use-in-logging
Feb 15, 2024
Merged

More cautious legacy_color conversion in Logging#53280
KristofferC merged 1 commit intoJuliaLang:masterfrom
tecosaur:more-careful-face-use-in-logging

Conversation

@tecosaur
Copy link
Copy Markdown
Member

@tecosaur tecosaur commented Feb 11, 2024

Can be seen as a follow-on from #51829, also wants
JuliaLang/StyledStrings.jl#37
to behave as expected.

@tecosaur tecosaur added display and printing Aesthetics and correctness of printed representations of objects. logging The logging framework labels Feb 11, 2024
While the original line

    color = StyledStrings.Face(foreground=StyledStrings.Legacy.legacy_color(color))

does a perfectly adequate job of mapping old color names to
`SimpleColor`s, it neglects the newer capability of using named `Faces`
with logging.

It is better to first check that the value of `color` can indeed be
recognised as a `legacy_color`-compatible named color, before using it
as the foreground value.
@tecosaur tecosaur force-pushed the more-careful-face-use-in-logging branch from 9bb4068 to d222762 Compare February 12, 2024 04:39
@tecosaur
Copy link
Copy Markdown
Member Author

I think this should be able to be "just merged"

@KristofferC KristofferC merged commit 61c3521 into JuliaLang:master Feb 15, 2024
@KristofferC
Copy link
Copy Markdown
Member

I goofed with the commit msg...

tecosaur added a commit to tecosaur/julia that referenced this pull request Mar 4, 2024
KristofferC pushed a commit that referenced this pull request May 10, 2024
aviatesk pushed a commit that referenced this pull request May 13, 2024
lazarusA pushed a commit to lazarusA/julia that referenced this pull request Jul 12, 2024
@tecosaur tecosaur deleted the more-careful-face-use-in-logging branch August 11, 2024 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

display and printing Aesthetics and correctness of printed representations of objects. logging The logging framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants