mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Use tracing crate for logging (#1192)
* egui_web: use tracing crate * egui_glow: use tracing crate * Log at the debug level * egui_demo_app: enable tracing to log to stdout * Use tracing in egui-winit * Add opt-in tracing support to egui
This commit is contained in:
@@ -15,11 +15,11 @@ impl Default for ScreenReader {
|
||||
fn default() -> Self {
|
||||
let tts = match tts::Tts::default() {
|
||||
Ok(screen_reader) => {
|
||||
eprintln!("Initialized screen reader.");
|
||||
tracing::debug!("Initialized screen reader.");
|
||||
Some(screen_reader)
|
||||
}
|
||||
Err(err) => {
|
||||
eprintln!("Failed to load screen reader: {}", err);
|
||||
tracing::warn!("Failed to load screen reader: {}", err);
|
||||
None
|
||||
}
|
||||
};
|
||||
@@ -38,10 +38,10 @@ impl ScreenReader {
|
||||
return;
|
||||
}
|
||||
if let Some(tts) = &mut self.tts {
|
||||
eprintln!("Speaking: {:?}", text);
|
||||
tracing::debug!("Speaking: {:?}", text);
|
||||
let interrupt = true;
|
||||
if let Err(err) = tts.speak(text, interrupt) {
|
||||
eprintln!("Failed to read: {}", err);
|
||||
tracing::warn!("Failed to read: {}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user