mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-28 05:04:15 -05:00
improve some error logs
...in particular, pass the error as a tracing param rather than directly in the main error message. The new behavior is nicer with e.g. OpenTelemetry.
This commit is contained in:
@@ -99,7 +99,7 @@ impl Clocks for RealClocks {
|
||||
fn sleep(&self, how_long: Duration) {
|
||||
match how_long.to_std() {
|
||||
Ok(d) => thread::sleep(d),
|
||||
Err(e) => warn!("Invalid duration {:?}: {}", how_long, e),
|
||||
Err(err) => warn!(%err, "invalid duration {:?}", how_long),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user