fix(tvix/tracing): Enable tracing in tvix-build.

Change-Id: Ica9734d7774da4d5e2a5cacab6b9feb27becc3e2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12720
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vova Kryachko 2024-11-01 10:57:42 -04:00 committed by Vladimir Kryachko
parent 9e294db820
commit 4ec9a4b7df
3 changed files with 5 additions and 2 deletions

View file

@ -50,7 +50,9 @@ enum Commands {
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let cli = Cli::parse();
let _ = tvix_tracing::TracingBuilder::default().enable_progressbar();
tvix_tracing::TracingBuilder::default()
.enable_progressbar()
.build()?;
match cli.command {
Commands::Daemon {

View file

@ -57,7 +57,7 @@ fn lint(code: &str, path: Option<PathBuf>, args: &Args) -> bool {
fn main() {
let args = Args::parse();
let _ = tvix_tracing::TracingBuilder::default()
tvix_tracing::TracingBuilder::default()
.enable_progressbar()
.build()
.expect("unable to set up tracing subscriber");

View file

@ -145,6 +145,7 @@ impl TracingHandle {
}
}
#[must_use = "Don't forget to call build() to enable tracing."]
#[derive(Default)]
pub struct TracingBuilder {
progess_bar: bool,