git.delta.rocks / fleet / refs/commits / b66112ef1437

difftreelog

chore reduce iroh log noise

ztzovopoYaroslav Bolyukin2026-06-22parent: #78196e1.patch.diff

4 files changed

modifiedcmds/fleet/src/main.rsdiffbeforeafterboth
--- a/cmds/fleet/src/main.rs
+++ b/cmds/fleet/src/main.rs
@@ -180,7 +180,7 @@
 		)
 	};
 
-	let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info"));
+	let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("noq_udp=warn,info"));
 
 	let tree = {
 		#[cfg(feature = "indicatif")]
modifiedremowt/cmds/remowt-ssh/src/main.rsdiffbeforeafterboth
--- a/remowt/cmds/remowt-ssh/src/main.rs
+++ b/remowt/cmds/remowt-ssh/src/main.rs
@@ -18,10 +18,10 @@
 use remowt_ui_prompt::{PrependSourcePrompter, Source};
 use tokio::io::unix::AsyncFd;
 use tokio::io::{AsyncRead, ReadBuf};
-use tokio::signal::unix::{signal, SignalKind};
+use tokio::signal::unix::{SignalKind, signal};
 use tracing::debug;
+use tracing_subscriber::EnvFilter;
 use tracing_subscriber::prelude::*;
-use tracing_subscriber::EnvFilter;
 
 #[derive(Parser)]
 enum Opts {
modifiedremowt/crates/remowt-client/src/lib.rsdiffbeforeafterboth
--- a/remowt/crates/remowt-client/src/lib.rs
+++ b/remowt/crates/remowt-client/src/lib.rs
@@ -27,7 +27,7 @@
 	fs,
 	io::{AsyncBufReadExt as _, AsyncReadExt as _, AsyncWriteExt as _, BufReader},
 };
-use tracing::{debug, info, warn};
+use tracing::{Instrument as _, debug, info, warn};
 use uuid::Uuid;
 
 pub mod editor;
@@ -655,28 +655,31 @@
 	context: String,
 	stderr: bool,
 ) -> JoinHandle<()> {
-	tokio::spawn(async move {
-		let mut reader = BufReader::new(stream);
-		let mut buf = Vec::with_capacity(4096);
-		loop {
-			buf.clear();
-			match reader.read_until(b'\n', &mut buf).await {
-				Ok(0) => break,
-				Ok(_) => {
-					let line = String::from_utf8_lossy(buf.strip_suffix(b"\n").unwrap_or(&buf));
-					if stderr {
-						warn!(context = %context, "{line}");
-					} else {
-						info!(context = %context, "{line}");
+	tokio::spawn(
+		async move {
+			let mut reader = BufReader::new(stream);
+			let mut buf = Vec::with_capacity(4096);
+			loop {
+				buf.clear();
+				match reader.read_until(b'\n', &mut buf).await {
+					Ok(0) => break,
+					Ok(_) => {
+						let line = String::from_utf8_lossy(buf.strip_suffix(b"\n").unwrap_or(&buf));
+						if stderr {
+							warn!(context = %context, "{line}");
+						} else {
+							info!(context = %context, "{line}");
+						}
+					}
+					Err(e) => {
+						warn!(context = %context, "child stdio read failed: {e}");
+						break;
 					}
-				}
-				Err(e) => {
-					warn!(context = %context, "child stdio read failed: {e}");
-					break;
 				}
 			}
 		}
-	})
+		.in_current_span(),
+	)
 }
 
 fn local_runtime_dir() -> Result<(Utf8PathBuf, Option<TempDir>)> {
modifiedremowt/crates/remowt-endpoints/src/nix_daemon.rsdiffbeforeafterboth
before · remowt/crates/remowt-endpoints/src/nix_daemon.rs
1use std::process::Stdio;2use std::sync::Arc;34use bifrostlink::declarative::endpoints;5use bifrostlink::Config;6use remowt_link_shared::iroh_tunnel::{TunnelAddr, TunnelDialer};7use serde::{Deserialize, Serialize};8use std::result::Result;9use tokio::process::Command;1011#[derive(Clone)]12pub struct NixDaemon {13	dialer: Arc<TunnelDialer>,14}1516impl NixDaemon {17	pub fn new(dialer: Arc<TunnelDialer>) -> Self {18		Self { dialer }19	}20}2122#[derive(Serialize, Deserialize, Debug, thiserror::Error)]23pub enum Error {24	#[error("nix daemon unavailable: {0}")]25	DaemonUnavailable(String),26	#[error("tunnel socket unavailable: {0}")]27	Tunnel(String),28}2930#[endpoints(ns = 4)]31impl NixDaemon {32	#[endpoints(id = 2)]33	async fn serve_store(&self, store: String, tunnel: TunnelAddr) -> Result<(), Error> {34		let mut child = Command::new("nix-daemon")35			.arg("--stdio")36			.arg("--store")37			.arg(&store)38			.stdin(Stdio::piped())39			.stdout(Stdio::piped())40			.spawn()41			.map_err(|e| Error::DaemonUnavailable(e.to_string()))?;42		let tunnel = self43			.dialer44			.connect_tunnel(&tunnel)45			.await46			.map_err(|e| Error::Tunnel(e.to_string()))?;47		let mut stdin = child.stdin.take().expect("piped");48		let mut stdout = child.stdout.take().expect("piped");49		tokio::spawn(async move {50			let (mut tr, mut tw) = tokio::io::split(tunnel);51			let _ = tokio::join!(52				tokio::io::copy(&mut tr, &mut stdin),53				tokio::io::copy(&mut stdout, &mut tw),54			);55			let _ = child.wait().await;56		});57		Ok(())58	}59}
after · remowt/crates/remowt-endpoints/src/nix_daemon.rs
1use std::process::Stdio;2use std::sync::Arc;34use bifrostlink::Config;5use bifrostlink::declarative::endpoints;6use remowt_link_shared::iroh_tunnel::{TunnelAddr, TunnelDialer};7use serde::{Deserialize, Serialize};8use std::result::Result;9use tokio::io::{self, AsyncWriteExt as _};10use tokio::process::Command;1112#[derive(Clone)]13pub struct NixDaemon {14	dialer: Arc<TunnelDialer>,15}1617impl NixDaemon {18	pub fn new(dialer: Arc<TunnelDialer>) -> Self {19		Self { dialer }20	}21}2223#[derive(Serialize, Deserialize, Debug, thiserror::Error)]24pub enum Error {25	#[error("nix daemon unavailable: {0}")]26	DaemonUnavailable(String),27	#[error("tunnel socket unavailable: {0}")]28	Tunnel(String),29}3031#[endpoints(ns = 4)]32impl NixDaemon {33	#[endpoints(id = 2)]34	async fn serve_store(&self, store: String, tunnel: TunnelAddr) -> Result<(), Error> {35		let mut child = Command::new("nix-daemon")36			.arg("--stdio")37			.arg("--store")38			.arg(&store)39			.stdin(Stdio::piped())40			.stdout(Stdio::piped())41			.spawn()42			.map_err(|e| Error::DaemonUnavailable(e.to_string()))?;43		let tunnel = self44			.dialer45			.connect_tunnel(&tunnel)46			.await47			.map_err(|e| Error::Tunnel(e.to_string()))?;48		let mut stdin = child.stdin.take().expect("piped");49		let mut stdout = child.stdout.take().expect("piped");50		tokio::spawn(async move {51			let (mut tr, mut tw) = io::split(tunnel);52			let to_child = async {53				let _ = io::copy(&mut tr, &mut stdin).await;54				let _ = stdin.shutdown().await;55			};56			let from_child = async {57				let _ = io::copy(&mut stdout, &mut tw).await;58				let _ = tw.shutdown().await;59			};60			tokio::join!(to_child, from_child);61			let _ = child.wait().await;62		});63		Ok(())64	}65}