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

Use tracing-tree for logging / clean up debug output #544

Merged
merged 3 commits into from
Jun 29, 2020

Conversation

nathanwhit
Copy link
Member

@nathanwhit nathanwhit commented Jun 28, 2020

This PR makes it so we use the tracing-tree crate for logging output. This adds indentation to the logs, and generally makes the logging output much more readable compared to the current state.

I also cleaned up many of the logging calls to properly use the tracing macros (e.g. create a new span when entering a function instead of just emitting an event).

Copy link
Member

@jackh726 jackh726 left a comment

Choose a reason for hiding this comment

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

This can be merged with a rebase @nathanwhit

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Woah, stuff like debug!(?foo) is surprising to me. Where can I read up on that?

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jun 29, 2020

That said, 👍 to merging, I trust this makes sense even if I don't get it yet

@nathanwhit
Copy link
Member Author

Woah, stuff like debug!(?foo) is surprising to me. Where can I read up on that?

It definitely does take a bit of getting used to, the tracing docs are quite helpful in explaining it. The macro syntax specifically is covered here.

(As a side note, I've been meaning to add some documentation in the chalk book about using the macros, it seems like it would be good to have some of the basics covered there with a link to the full docs.)

@nathanwhit nathanwhit merged commit 87564e4 into rust-lang:master Jun 29, 2020
@nathanwhit nathanwhit deleted the tracing-tree branch June 29, 2020 21:59
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.

4 participants