Files
qdrant/lib/segment/src/common/error_logging.rs
dependabot[bot] 7f3a2c2981 build(deps): bump log from 0.4.26 to 0.4.27 (#6247)
* build(deps): bump log from 0.4.26 to 0.4.27

Bumps [log](https://github.com/rust-lang/log) from 0.4.26 to 0.4.27.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.26...0.4.27)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* put variables inside the strings for log macros

* also for pyroscope

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-03-25 10:08:21 +01:00

15 lines
265 B
Rust

use log::debug;
pub trait LogError {
fn describe(self, msg: &str) -> Self;
}
impl<T, E> LogError for Result<T, E> {
fn describe(self, msg: &str) -> Self {
if self.is_err() {
debug!("Error while: {msg}");
}
self
}
}