Skip to content

Commit

Permalink
Merge pull request #2473 from subspace/suppress-quinn-warnings
Browse files Browse the repository at this point in the history
Suppress quinn warnings
  • Loading branch information
nazar-pc authored Jan 30, 2024
2 parents 6408ea9 + c2239f0 commit 7471ac2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/subspace-farmer/src/bin/subspace-farmer/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ mod commands;
mod utils;

use clap::Parser;
use std::fs;
use std::path::PathBuf;
use std::{env, fs};
use subspace_farmer::single_disk_farm::SingleDiskFarm;
use subspace_proof_of_space::chia::ChiaTable;
use tracing::info;
Expand Down Expand Up @@ -55,6 +55,11 @@ enum Command {

#[tokio::main]
async fn main() -> anyhow::Result<()> {
// TODO: This is a hack to work around https://github.com/quinn-rs/quinn/issues/1750, should be
// removed once fixed upstream
if env::var("RUST_LOG").is_err() {
env::set_var("RUST_LOG", "info,quinn_udp=error");
}
tracing_subscriber::registry()
.with(
fmt::layer()
Expand Down
6 changes: 6 additions & 0 deletions crates/subspace-node/src/commands/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use sp_core::sr25519::Pair;
use sp_core::Pair as PairT;
use sp_domains::KEY_TYPE;
use sp_keystore::Keystore;
use std::env;
use std::path::PathBuf;
use tracing_subscriber::filter::LevelFilter;
use tracing_subscriber::prelude::*;
Expand Down Expand Up @@ -58,6 +59,11 @@ pub(super) struct InitLoggerResult {
}

pub(super) fn init_logger() -> InitLoggerResult {
// TODO: This is a hack to work around https://github.com/quinn-rs/quinn/issues/1750, should be
// removed once fixed upstream
if env::var("RUST_LOG").is_err() {
env::set_var("RUST_LOG", "info,quinn_udp=error");
}
// TODO: Workaround for https://github.com/tokio-rs/tracing/issues/2214, also on
// Windows terminal doesn't support the same colors as bash does
let enable_color = if cfg!(windows) {
Expand Down

0 comments on commit 7471ac2

Please sign in to comment.