refactor(tvix/build): drop log level cli arg

This does the same as cl/12585 did for tvix-cli.

Change-Id: Ia2d693f5ad10feb81777c951bcd4489a3a83ad7c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12716
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
This commit is contained in:
Florian Klink 2024-10-30 12:29:58 +00:00 committed by clbot
parent 6c13491fe0
commit 38f27c4502

View file

@ -4,7 +4,7 @@ use tokio_listener::Listener;
use tokio_listener::SystemOptions; use tokio_listener::SystemOptions;
use tokio_listener::UserOptions; use tokio_listener::UserOptions;
use tonic::{self, transport::Server}; use tonic::{self, transport::Server};
use tracing::{info, Level}; use tracing::info;
use tvix_build::{ use tvix_build::{
buildservice, buildservice,
proto::{build_service_server::BuildServiceServer, GRPCBuildServiceWrapper}, proto::{build_service_server::BuildServiceServer, GRPCBuildServiceWrapper},
@ -25,13 +25,6 @@ static GLOBAL: MiMalloc = MiMalloc;
#[derive(Parser)] #[derive(Parser)]
#[command(author, version, about, long_about = None)] #[command(author, version, about, long_about = None)]
struct Cli { struct Cli {
/// A global log level to use when printing logs.
/// It's also possible to set `RUST_LOG` according to
/// `tracing_subscriber::filter::EnvFilter`, which will always have
/// priority.
#[arg(long, default_value_t=Level::INFO)]
log_level: Level,
#[command(subcommand)] #[command(subcommand)]
command: Commands, command: Commands,
} }
@ -57,9 +50,7 @@ enum Commands {
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> { async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let cli = Cli::parse(); let cli = Cli::parse();
let _ = tvix_tracing::TracingBuilder::default() let _ = tvix_tracing::TracingBuilder::default().enable_progressbar();
.level(cli.log_level)
.enable_progressbar();
match cli.command { match cli.command {
Commands::Daemon { Commands::Daemon {