Now that #[track_caller]
is stable, I went to one of our existing applications to see if I could fix the annoyance where our error reporting doesn't mix well with our retry mechanism because the retrier location gets into the error reports instead of the place where the actual error occurred. It didn't work out-of-the-box because log
uses the file!()
and line!()
macros, which are built-in to the compiler and (at least from my observations) don't seem to use the same location information as std::panic::Location
.
I'm wondering if this shouldn't be changed? It seems like you'd want the ability to manipulate location information in log messages for the same reasons you'd want to manipulate location information in panic messages. I'm more than happy to open a PR to log
for this, but I wondered if I was missing a good reason to not do this