From 36b3343a162800af9bedfecc2d68c7a61430f65b Mon Sep 17 00:00:00 2001 From: Max Audron Date: Wed, 1 Dec 2021 16:23:47 +0100 Subject: add more bufferview details and fix logging --- examples/statetracker/src/main.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'examples/statetracker/src/main.rs') diff --git a/examples/statetracker/src/main.rs b/examples/statetracker/src/main.rs index a56d054..ef4a2b3 100644 --- a/examples/statetracker/src/main.rs +++ b/examples/statetracker/src/main.rs @@ -14,6 +14,7 @@ use libquassel::message::{ }; use tracing::debug; +use tracing_subscriber::prelude::*; use crate::server::{Direction, Message, ServerWidget}; @@ -202,7 +203,24 @@ pub struct Syncer { } fn main() { - // pretty_env_logger::init(); + // tracing_subscriber::fmt::fmt() + // .with_span_events(tracing_subscriber::fmt::format::FmtSpan::ACTIVE) + // .init(); + + let filter = tracing_subscriber::filter::Targets::new() + .with_default(tracing::Level::TRACE) + .with_target("druid", tracing::metadata::LevelFilter::OFF); + + let env_filter = tracing_subscriber::EnvFilter::from_default_env(); + + tracing_subscriber::registry() + .with( + tracing_subscriber::fmt::layer() + .with_span_events(tracing_subscriber::fmt::format::FmtSpan::ACTIVE), + ) + .with(filter) + .with(env_filter) + .init(); // describe the main window let main_window = WindowDesc::new(StateTracker::widget()) @@ -214,7 +232,6 @@ fn main() { // start the application AppLauncher::with_window(main_window) - .log_to_console() .delegate(StateTrackerDelegate) .launch(initial_state) .expect("Failed to launch application"); -- cgit v1.2.3