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

More cautious legacy_color conversion in Logging #53280

Merged

Conversation

tecosaur
Copy link
Contributor

@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
Contributor Author

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

@KristofferC KristofferC merged commit 61c3521 into JuliaLang:master Feb 15, 2024
6 of 9 checks passed
@KristofferC
Copy link
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