Commit 2243729b82

2243729b822318ca89e653caf3343c09ee660ed3

parent: 4963b25ab8

Unregistered key

Ulyssa <git@ulyssa.dev> · 2026-10-02 02:42 UTC
committer: <noreply@github.com>

Set default `log_level` to `off` (#774)

Layout: unified · split

src/config/mod.rs +1 −5
@@ -71,11 +71,7 @@ const DEFAULT_ICON_ENC: Cow<'static, str> = Cow::Borrowed("[E] ");
71const DEFAULT_ICON_UNENC: Cow<'static, str> = Cow::Borrowed("[U] "); 71const DEFAULT_ICON_UNENC: Cow<'static, str> = Cow::Borrowed("[U] ");
72const DEFAULT_ICON_UNKNOWN: Cow<'static, str> = Cow::Borrowed("[?] "); 72const DEFAULT_ICON_UNKNOWN: Cow<'static, str> = Cow::Borrowed("[?] ");
73 73
74const DEFAULT_LOG_LEVEL: &str = if cfg!(feature = "max_level_error") { 74const DEFAULT_LOG_LEVEL: &str = "off";
75 "error"
76} else {
77 "warn"
78};
79 75
80fn is_profile_char(c: char) -> bool { 76fn is_profile_char(c: char) -> bool {
81 c.is_ascii_alphanumeric() || c == '.' || c == '-' 77 c.is_ascii_alphanumeric() || c == '.' || c == '-'
src/main.rs +2 −1
@@ -43,6 +43,7 @@ use ratatui::Terminal;
43use ratatui::backend::CrosstermBackend; 43use ratatui::backend::CrosstermBackend;
44use tokio::sync::Mutex as AsyncMutex; 44use tokio::sync::Mutex as AsyncMutex;
45use tracing::Level; 45use tracing::Level;
46use tracing::level_filters::LevelFilter;
46use tracing_subscriber::{EnvFilter, FmtSubscriber}; 47use tracing_subscriber::{EnvFilter, FmtSubscriber};
47 48
48use crate::base::{HomeserverAction, KeysAction}; 49use crate::base::{HomeserverAction, KeysAction};
@@ -1061,7 +1062,7 @@ fn setup_logging(settings: &ApplicationSettings) -> tracing_appender::non_blocki
1061 .unwrap_or_else(print_exit) 1062 .unwrap_or_else(print_exit)
1062 } else { 1063 } else {
1063 EnvFilter::builder() 1064 EnvFilter::builder()
1064 .with_default_directive(Level::WARN.into()) 1065 .with_default_directive(LevelFilter::OFF.into())
1065 .parse(log_level) 1066 .parse(log_level)
1066 .map_err(|err| format!("Unable to parse `log_level`: {err}")) 1067 .map_err(|err| format!("Unable to parse `log_level`: {err}"))
1067 .unwrap_or_else(print_exit) 1068 .unwrap_or_else(print_exit)