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

Replace usages of io.aviso/pretty with org.clj-commons/pretty #381

Closed
wants to merge 2 commits into from

Conversation

hlship
Copy link

@hlship hlship commented Nov 20, 2023

The main issue is that anyone who is using customized fonts (as per the documentation on the wiki) will see failures, because the values have changed from strings to keywords.

This may warrant a major version upgrade in Timbre, or at least, a strongly worded note in the change log.

@hlship
Copy link
Author

hlship commented Nov 20, 2023

A further note: org.clj-commons/pretty has built-in checks for whether its likely that output is directed to a console or not; in the latter case, ANSI formatting codes (font and color) are eliminated automatically; I'm not sure who logs to a file with ANSI formatting, but that's likely going to be an explicit opt-in (there's a system property that can be set to override the normal check).

@ptaoussanis ptaoussanis self-assigned this Nov 21, 2023
@ptaoussanis
Copy link
Member

Thank you very much Howard! I'll definitely take a closer look at merging this when I'm next on batched Timbre work 👍

Cheers :-)

@ptaoussanis ptaoussanis force-pushed the master branch 2 times, most recently from 51a3b72 to 01513d4 Compare February 22, 2024 16:40
ptaoussanis added a commit that referenced this pull request Feb 23, 2024
Pretty v2 introduced an incompatible change to its font format.

Few (if any?) Timbre users actually customize these fonts beyond
possibly disabling them, so this shouldn't affect most folks.

But to be on the safe side, this commit introduces handling for
possible v1 style fonts.

There's 2 cases:

  1. [Compile-time] Invalid default fonts (set via environment variable / JVM property).
     In this case Timbre will throw, preventing compilation.

  2. [Runtime] Invalid fonts in output opts.
     In this case Timbre will log an error and ignore the invalid fonts.
@ptaoussanis
Copy link
Member

Will be addressed in upcoming release, closing 👍

ptaoussanis added a commit that referenced this pull request Feb 26, 2024
Pretty v2 introduced an incompatible change to its font format.

Few (if any?) Timbre users actually customize these fonts beyond
possibly disabling them, so this shouldn't affect most folks.

But to be on the safe side, this commit introduces handling for
possible v1 style fonts.

There's 2 cases:

  1. [Compile-time] Invalid default fonts (set via environment variable / JVM property).
     In this case Timbre will throw, preventing compilation.

  2. [Runtime] Invalid fonts in output opts.
     In this case Timbre will log an error and ignore the invalid fonts.
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