From b52bb6e7915c6f2cb481a90918ce6483f0a43ad4 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 15 Sep 2023 14:44:10 +0200 Subject: fix(tvix/store): log to stderr, not stdout This leaves some space in stdout to provide actual meaningful output. Also, rename print_node to log_node because that's what it does, it's using the logger to log out more detailed info. Change-Id: Ic64a6330dbfcdc63eb4198067a5c5e47b841b9a5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9336 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: Connor Brewster Reviewed-by: Adam Joseph --- tvix/store/src/bin/tvix-store.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tvix/store/src/bin') diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index 3e1c0ef9ae..7f6766d00e 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -110,7 +110,7 @@ async fn main() -> Result<(), Box> { .with(if cli.json { Some( tracing_subscriber::fmt::Layer::new() - .with_writer(io::stdout.with_max_level(level)) + .with_writer(io::stderr.with_max_level(level)) .json(), ) } else { @@ -119,7 +119,7 @@ async fn main() -> Result<(), Box> { .with(if !cli.json { Some( tracing_subscriber::fmt::Layer::new() - .with_writer(io::stdout.with_max_level(level)) + .with_writer(io::stderr.with_max_level(level)) .pretty(), ) } else { @@ -241,7 +241,8 @@ async fn main() -> Result<(), Box> { // from there (it might contain additional signatures). let path_info = path_info_service.put(path_info)?; - print_node(&path_info.node.unwrap().node.unwrap(), &path); + log_node(&path_info.node.unwrap().node.unwrap(), &path); + Ok(()) }); task @@ -302,7 +303,7 @@ async fn main() -> Result<(), Box> { Ok(()) } -fn print_node(node: &Node, path: &Path) { +fn log_node(node: &Node, path: &Path) { match node { Node::Directory(directory_node) => { info!( -- cgit 1.4.1