mirror of
https://github.com/spartanz51/tutabridge.git
synced 2026-06-24 10:54:32 +02:00
chore(gui): tame the log firehose
The GUI logged everything at "debug", so every HTTP/2 frame, hyper pool event and rustls record buried the bridge's own IMAP/SMTP/sync lines and made the logs unreadable (and burned CPU/IO). Default the GUI filter to keep tutabridge_core/gui at debug while pinning h2/hyper/rustls/mio and friends to warn. RUST_LOG still overrides. The CLI was already at "info".
This commit is contained in:
@@ -9,7 +9,12 @@ use tokio::sync::Mutex;
|
||||
use tutabridge_core::bridge::BridgeHandle;
|
||||
|
||||
fn main() {
|
||||
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("debug")).init();
|
||||
// Keep the bridge's own logs at debug but silence the HTTP/2 + TLS transport
|
||||
// firehose (h2/hyper/rustls/mio), which otherwise buries every useful line.
|
||||
// RUST_LOG still overrides this when set.
|
||||
const LOG_FILTER: &str = "info,tutabridge_core=debug,tutabridge_gui=debug,\
|
||||
h2=warn,hyper=warn,hyper_util=warn,rustls=warn,mio=warn,tokio_util=warn,want=warn";
|
||||
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or(LOG_FILTER)).init();
|
||||
|
||||
tokio_rustls::rustls::crypto::ring::default_provider()
|
||||
.install_default()
|
||||
|
||||
Reference in New Issue
Block a user