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

feat(docs): add tracing example #1192

Merged
merged 2 commits into from
Jun 20, 2024
Merged

feat(docs): add tracing example #1192

merged 2 commits into from
Jun 20, 2024

Conversation

joshka
Copy link
Member

@joshka joshka commented Jun 19, 2024

Add an example that demonstrates logging to a file for:
https://forum.ratatui.rs/t/how-do-you-println-debug-your-tui-programs/66

cargo run --example tracing
RUST_LOG=trace cargo run --example=tracing
cat tracing.log

Made with VHS

@joshka joshka added the Status: Review Needed PR needs a review / Issue needs buy-in from other maintainers / users label Jun 19, 2024
@joshka joshka force-pushed the jm/tracing-example branch from bd4cf57 to e4c432a Compare June 19, 2024 04:38
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.4%. Comparing base (127d706) to head (e4c432a).
Report is 1 commits behind head on main.

Current head e4c432a differs from pull request most recent head 8ec4aaa

Please upload reports for the commit 8ec4aaa to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1192     +/-   ##
=======================================
- Coverage   94.4%   94.4%   -0.1%     
=======================================
  Files         62      62             
  Lines      14935   14941      +6     
=======================================
+ Hits       14105   14110      +5     
- Misses       830     831      +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EdJoPaTo
Copy link
Contributor

Should probably wait for #1180 or #1189? Otherwise, it will result in more merge conflicts.

Copy link
Member

@orhun orhun left a comment

Choose a reason for hiding this comment

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

Looks good! I suggest mentioning tui-logger somewhere in the docs as well. It greatly reduces the pain of designing custom widgets to display/filter the tracing logs!

@joshka
Copy link
Member Author

joshka commented Jun 20, 2024

Should probably wait for #1180 or #1189? Otherwise, it will result in more merge conflicts.

I'm fine with fixing up merge conflicts later. I'd prefer that over leaving a large amount of things which are good enough in a pending state.

Add an example that demonstrates logging to a file for:
<https://forum.ratatui.rs/t/how-do-you-println-debug-your-tui-programs/66>

```shell
cargo run --example tracing
RUST_LOG=trace cargo run --example=tracing
cat tracing.log
```

![Made with VHS](https://vhs.charm.sh/vhs-21jgJCedh2YnFDONw0JW7l.gif)
@joshka joshka force-pushed the jm/tracing-example branch from e4c432a to 2622064 Compare June 20, 2024 00:27
@joshka joshka merged commit 3f2f2cd into main Jun 20, 2024
3 checks passed
@joshka joshka deleted the jm/tracing-example branch June 20, 2024 00:29
itsjunetime pushed a commit to itsjunetime/ratatui that referenced this pull request Jun 23, 2024
Add an example that demonstrates logging to a file for:

<https://forum.ratatui.rs/t/how-do-you-println-debug-your-tui-programs/66>

```shell
cargo run --example tracing
RUST_LOG=trace cargo run --example=tracing
cat tracing.log
```

![Made with VHS](https://vhs.charm.sh/vhs-21jgJCedh2YnFDONw0JW7l.gif)
@joshka joshka removed the Status: Review Needed PR needs a review / Issue needs buy-in from other maintainers / users label Jun 25, 2024
joshka added a commit to erak/ratatui that referenced this pull request Oct 14, 2024
Add an example that demonstrates logging to a file for:

<https://forum.ratatui.rs/t/how-do-you-println-debug-your-tui-programs/66>

```shell
cargo run --example tracing
RUST_LOG=trace cargo run --example=tracing
cat tracing.log
```

![Made with VHS](https://vhs.charm.sh/vhs-21jgJCedh2YnFDONw0JW7l.gif)
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.

3 participants