Skip to content

Commit b340965

Browse files
committed
Auto merge of #12991 - weihanglo:tracing-config-load, r=epage
refactor: log when loading config from file When I was tracing some nasty bug and wanted to point at config probding, I wish there were some logs standing out and telling me I was wrong. Would be great if every config file loading is logged.
2 parents f23b190 + 1e58b10 commit b340965

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cargo/util/config/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,8 @@ impl Config {
12001200
path.display()
12011201
);
12021202
}
1203+
tracing::debug!(?path, ?why_load, includes, "load config from file");
1204+
12031205
let contents = fs::read_to_string(path)
12041206
.with_context(|| format!("failed to read configuration file `{}`", path.display()))?;
12051207
let toml = parse_document(&contents, path, self).with_context(|| {

0 commit comments

Comments
 (0)