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 log with tracing #3524

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Replace log with tracing #3524

merged 1 commit into from
Mar 1, 2024

Conversation

notgull
Copy link
Member

@notgull notgull commented Feb 26, 2024

Tracing is a modern replacement for the log crate that allows
for annotating log messages with the function that they come from.

Closes #3482

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

@notgull notgull added C - waiting on maintainer A maintainer must review this code S - maintenance Repaying technical debt C - needs discussion Direction must be ironed out and removed C - waiting on maintainer A maintainer must review this code labels Feb 26, 2024
Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work with simple_logger that we use in examples?

@notgull
Copy link
Member Author

notgull commented Feb 28, 2024

How does this work with simple_logger that we use in examples?

If you enable the log feature it will use the logger. However for convenience I've replaced it with tracing-subscriber.

examples/x11_embed.rs Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/window.rs Outdated Show resolved Hide resolved
Copy link
Member

@kchibisov kchibisov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How it works when downstream uses log and its machinery? I'd assume you need a special handling?

Should also state in the CHANGELOG that logging was changed, since log users should somehow update.

src/error.rs Outdated Show resolved Hide resolved
@notgull notgull requested a review from kchibisov March 1, 2024 02:44
Tracing is a modern replacement for the log crate that allows for
annotating log messages with the function that they come from.

Signed-off-by: John Nunley <[email protected]>
Closes: #3482
@kchibisov kchibisov merged commit 9443476 into master Mar 1, 2024
51 checks passed
@kchibisov kchibisov deleted the notgull/tracing branch March 1, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out S - maintenance Repaying technical debt
Development

Successfully merging this pull request may close these issues.

Use tracing instead of log
3 participants