Improve logging by adding details as fields instead of into the msg.

This commit is contained in:
Philipp Hoenisch 2021-05-05 13:49:11 +10:00
parent 1706b36800
commit c011e95062
No known key found for this signature in database
GPG key ID: E5F8E74C672BC666
16 changed files with 150 additions and 114 deletions

View file

@ -24,8 +24,8 @@ pub fn ensure_directory_exists(file: &Path) -> Result<(), std::io::Error> {
if let Some(path) = file.parent() {
if !path.exists() {
tracing::info!(
"Parent directory does not exist, creating recursively: {}",
file.display()
directory = %file.display(),
"Parent directory does not exist, creating recursively",
);
return std::fs::create_dir_all(path);
}