Skip to content

Commit

Permalink
disable error logging by default.
Browse files Browse the repository at this point in the history
lots of very beningn things produce error level logs. E.g. connections being
dropped. We don't want error logs during normal operation.
  • Loading branch information
rklaehn committed Dec 19, 2023
1 parent 0297f3f commit 687f060
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions iroh-bytes/src/store/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ pub enum EntryStatus {
}

/// An entry in a store that supports partial entries.
///
/// This correspnds to [`EntryStatus`], but also includes the entry itself.
#[derive(Debug)]
pub enum PossiblyPartialEntry<D: PartialMap> {
/// A complete entry.
Expand Down
7 changes: 6 additions & 1 deletion iroh/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::time::Duration;

use anyhow::Result;
use clap::Parser;
use tracing::level_filters::LevelFilter;
use tracing_subscriber::{prelude::*, EnvFilter};

mod commands;
Expand All @@ -27,7 +28,11 @@ async fn main_impl() -> Result<()> {
let lp = tokio_util::task::LocalPoolHandle::new(num_cpus::get());
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer().with_writer(std::io::stderr))
.with(EnvFilter::from_default_env())
.with(
EnvFilter::builder()
.with_default_directive(LevelFilter::OFF.into())
.from_env_lossy(),
)
.init();

let cli = Cli::parse();
Expand Down

0 comments on commit 687f060

Please sign in to comment.