fix: display spans outside debug
Some checks failed
Test & Lint / lint (push) Has been cancelled

This commit is contained in:
daimond113 2024-12-22 12:43:42 +01:00
parent db3335bbf7
commit c3e764ddda
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C
4 changed files with 9 additions and 9 deletions

View file

@ -71,7 +71,7 @@ impl Project {
let version_id = version_id.clone();
let node = node.clone();
let span = tracing::debug_span!(
let span = tracing::info_span!(
"download",
name = name.to_string(),
version_id = version_id.to_string()

View file

@ -254,7 +254,7 @@ impl Project {
let manifest = manifest.clone();
let package_types = package_types.clone();
let span = tracing::debug_span!(
let span = tracing::info_span!(
"link",
name = name.to_string(),
version_id = version_id.to_string()

View file

@ -11,10 +11,10 @@ use std::{
};
use tempfile::NamedTempFile;
use tracing::instrument;
use tracing_indicatif::IndicatifLayer;
use tracing_indicatif::{filter::IndicatifFilter, IndicatifLayer};
use tracing_subscriber::{
filter::LevelFilter, fmt::time::uptime, layer::SubscriberExt, util::SubscriberInitExt,
EnvFilter,
EnvFilter, Layer,
};
mod cli;
@ -134,7 +134,7 @@ async fn run() -> anyhow::Result<()> {
std::process::exit(status.code().unwrap());
}
let indicatif_layer = IndicatifLayer::new();
let indicatif_layer = IndicatifLayer::new().with_filter(IndicatifFilter::new(false));
let tracing_env_filter = EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
@ -152,7 +152,7 @@ async fn run() -> anyhow::Result<()> {
.with(
tracing_subscriber::fmt::layer()
.pretty()
.with_writer(indicatif_layer.get_stderr_writer())
.with_writer(indicatif_layer.inner().get_stderr_writer())
.with_timer(uptime()),
)
.with(indicatif_layer)

View file

@ -102,7 +102,7 @@ impl Project {
continue;
};
let span = tracing::debug_span!("resolve from old graph", alias);
let span = tracing::info_span!("resolve from old graph", alias);
let _guard = span.enter();
tracing::debug!("resolved {}@{} from old dependency graph", name, version);
@ -131,7 +131,7 @@ impl Project {
while let Some((dep_name, dep_version, path)) = queue.pop_front() {
let inner_span =
tracing::debug_span!("resolve dependency", path = path.join(">"));
tracing::info_span!("resolve dependency", path = path.join(">"));
let _inner_guard = inner_span.enter();
if let Some(dep_node) = previous_graph
.get(dep_name)
@ -399,7 +399,7 @@ impl Project {
Ok(())
}
.instrument(tracing::debug_span!("resolve new/changed", path = path.join(">")))
.instrument(tracing::info_span!("resolve new/changed", path = path.join(">")))
.await?;
}