Skip to content

Commit c678487

Browse files
committed
feat(log): set level of #[tracing::instrument(err)] to TRACE
1 parent 2ede7f7 commit c678487

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

doc/dev-guide/src/tracing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ when enabled. Instrumenting a currently uninstrumented function is mostly simply
101101
done like so:
102102

103103
```rust
104-
#[tracing::instrument(level = "trace", err, skip_all)]
104+
#[tracing::instrument(level = "trace", err(level = "trace"), skip_all)]
105105
```
106106

107107
`skip_all` is not required, but some core structs don't implement Debug yet, and

src/bin/rustup-init.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async fn run_rustup(
7676
result
7777
}
7878

79-
#[tracing::instrument(level = "trace", err)]
79+
#[tracing::instrument(level = "trace", err(level = "trace"))]
8080
async fn run_rustup_inner(
8181
process: &Process,
8282
console_filter: Handle<EnvFilter, Registry>,

src/command.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use anyhow::{Context, Result};
99

1010
use crate::errors::*;
1111

12-
#[tracing::instrument(level = "trace", err)]
12+
#[tracing::instrument(level = "trace", err(level = "trace"))]
1313
pub(crate) fn run_command_for_dir<S: AsRef<OsStr> + Debug>(
1414
mut cmd: Command,
1515
arg0: &str,

src/dist/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ pub(crate) struct DistOptions<'a> {
823823
// an upgrade then all the existing components will be upgraded.
824824
//
825825
// Returns the manifest's hash if anything changed.
826-
#[tracing::instrument(level = "trace", err, skip_all, fields(profile=format!("{:?}", opts.profile), prefix=prefix.path().to_string_lossy().to_string()))]
826+
#[tracing::instrument(level = "trace", err(level = "trace"), skip_all, fields(profile=format!("{:?}", opts.profile), prefix=prefix.path().to_string_lossy().to_string()))]
827827
pub(crate) async fn update_from_dist(
828828
prefix: &InstallPrefix,
829829
opts: &DistOptions<'_>,

src/install.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub(crate) enum InstallMethod<'a> {
3737

3838
impl<'a> InstallMethod<'a> {
3939
// Install a toolchain
40-
#[tracing::instrument(level = "trace", err, skip_all)]
40+
#[tracing::instrument(level = "trace", err(level = "trace"), skip_all)]
4141
pub(crate) async fn install(&self) -> Result<UpdateStatus> {
4242
let nh = &self.cfg().notify_handler;
4343
match self {

src/toolchain/distributable.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ impl<'a> DistributableToolchain<'a> {
324324
InstallPrefix::from(self.toolchain.path().to_owned()).guess_v1_manifest()
325325
}
326326

327-
#[tracing::instrument(level = "trace", err, skip_all)]
327+
#[tracing::instrument(level = "trace", err(level = "trace"), skip_all)]
328328
pub(crate) async fn install(
329329
cfg: &'a Cfg<'a>,
330330
toolchain: &ToolchainDesc,
@@ -354,7 +354,7 @@ impl<'a> DistributableToolchain<'a> {
354354
Ok((status, Self::new(cfg, toolchain.clone())?))
355355
}
356356

357-
#[tracing::instrument(level = "trace", err, skip_all)]
357+
#[tracing::instrument(level = "trace", err(level = "trace"), skip_all)]
358358
pub async fn install_if_not_installed(
359359
cfg: &'a Cfg<'a>,
360360
desc: &ToolchainDesc,
@@ -372,7 +372,7 @@ impl<'a> DistributableToolchain<'a> {
372372
}
373373
}
374374

375-
#[tracing::instrument(level = "trace", err, skip_all)]
375+
#[tracing::instrument(level = "trace", err(level = "trace"), skip_all)]
376376
pub(crate) async fn update(
377377
&mut self,
378378
components: &[&str],
@@ -384,7 +384,7 @@ impl<'a> DistributableToolchain<'a> {
384384
}
385385

386386
/// Update a toolchain with control over the channel behaviour
387-
#[tracing::instrument(level = "trace", err, skip_all)]
387+
#[tracing::instrument(level = "trace", err(level = "trace"), skip_all)]
388388
pub(crate) async fn update_extra(
389389
&mut self,
390390
components: &[&str],

0 commit comments

Comments
 (0)