difftreelog
chore reduce iroh log noise
4 files changed
cmds/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")]
remowt/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 {
remowt/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>)> {
remowt/crates/remowt-endpoints/src/nix_daemon.rsdiffbeforeafterboth1use std::process::Stdio;1use std::process::Stdio;2use std::sync::Arc;2use std::sync::Arc;334use bifrostlink::declarative::endpoints;4use bifrostlink::Config;5use bifrostlink::Config;5use bifrostlink::declarative::endpoints;6use remowt_link_shared::iroh_tunnel::{TunnelAddr, TunnelDialer};6use remowt_link_shared::iroh_tunnel::{TunnelAddr, TunnelDialer};7use serde::{Deserialize, Serialize};7use serde::{Deserialize, Serialize};8use std::result::Result;8use std::result::Result;9use tokio::io::{self, AsyncWriteExt as _};9use tokio::process::Command;10use tokio::process::Command;101111#[derive(Clone)]12#[derive(Clone)]47 let mut stdin = child.stdin.take().expect("piped");48 let mut stdin = child.stdin.take().expect("piped");48 let mut stdout = child.stdout.take().expect("piped");49 let mut stdout = child.stdout.take().expect("piped");49 tokio::spawn(async move {50 tokio::spawn(async move {50 let (mut tr, mut tw) = tokio::io::split(tunnel);51 let (mut tr, mut tw) = io::split(tunnel);51 let _ = tokio::join!(52 let to_child = async {52 tokio::io::copy(&mut tr, &mut stdin),53 let _ = io::copy(&mut tr, &mut stdin).await;53 tokio::io::copy(&mut stdout, &mut tw),54 let _ = stdin.shutdown().await;54 );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);55 let _ = child.wait().await;61 let _ = child.wait().await;56 });62 });57 Ok(())63 Ok(())