ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: show only ERROR-level tracing events by default

By setting a higher level by default, we open up to using the other
tracing levels without spamming the user.

I'm not sure if we should set it to ERROR or OFF by default, we let's
try ERROR for now. It shouldn't make any difference since we don't
have any ERROR-level events yet.
This commit is contained in:
Martin von Zweigbergk 2023-05-02 20:58:08 -07:00 committed by Martin von Zweigbergk
parent f8d56e816d
commit 9a942b98f8

View file

@ -327,7 +327,7 @@ impl TracingSubscription {
/// called as early as possible.
pub fn init() -> Self {
let filter = tracing_subscriber::EnvFilter::builder()
.with_default_directive(tracing::metadata::LevelFilter::INFO.into())
.with_default_directive(tracing::metadata::LevelFilter::ERROR.into())
.from_env_lossy();
let (filter, reload_log_filter) = tracing_subscriber::reload::Layer::new(filter);
tracing_subscriber::registry()