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 crate for logging #1192

Merged
merged 9 commits into from
Feb 1, 2022
Merged

Use tracing crate for logging #1192

merged 9 commits into from
Feb 1, 2022

Conversation

emilk
Copy link
Owner

@emilk emilk commented Feb 1, 2022

This adds the tracing crate to egui_web, egui_glow and egui-winit. egui gets it as an opt-in dependency. It is used for logging.

In egui_web the logs will automatically end up in the dev console. For native, app developers must add tracing-subscriber = "0.3" to their Cargo.toml and then add tracing_subscriber::fmt::init(); to their fn main in order to get logs to stdout. Even then, the egui crates log very little, so you may not see anything logged unless you run with RUST_LOG=debug.

@emilk emilk merged commit c6ac182 into master Feb 1, 2022
@emilk emilk deleted the log-tracing branch February 1, 2022 11:27
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.

1 participant