Demote .pgpass file warning to a debug message. (#3548)

Fixes #3531
This commit is contained in:
Dennis Schubert
2024-10-07 00:21:56 +02:00
committed by GitHub
parent cadf152e99
commit 028084bce3

View File

@@ -43,10 +43,20 @@ fn load_password_from_file(
) -> Option<String> {
let file = File::open(&path)
.map_err(|e| {
tracing::warn!(
path = %path.display(),
"Failed to open `.pgpass` file: {e:?}",
);
match e.kind() {
std::io::ErrorKind::NotFound => {
tracing::debug!(
path = %path.display(),
"`.pgpass` file not found",
);
}
_ => {
tracing::warn!(
path = %path.display(),
"Failed to open `.pgpass` file: {e:?}",
);
}
};
})
.ok()?;