reduce log noise on file writes (#11361)

This commit is contained in:
Skyler Hawthorne 2024-07-28 21:59:21 +01:00 committed by GitHub
parent 2a2bc79335
commit fa13b2bd0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1084,17 +1084,13 @@ impl Document {
Some(path) => match path.metadata() { Some(path) => match path.metadata() {
Ok(metadata) => match metadata.modified() { Ok(metadata) => match metadata.modified() {
Ok(mtime) => mtime, Ok(mtime) => mtime,
Err(e) => { Err(err) => {
log::error!( log::debug!("Could not fetch file system's mtime, falling back to current system time: {}", err);
"Using system time instead of fs' mtime: not supported on this platform: {e}"
);
SystemTime::now() SystemTime::now()
} }
}, },
Err(e) => { Err(err) => {
log::error!( log::debug!("Could not fetch file system's mtime, falling back to current system time: {}", err);
"Using system time instead of fs' mtime: failed to read file's metadata: {e}"
);
SystemTime::now() SystemTime::now()
} }
}, },