Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress quinn warnings #2473

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading