https://github.com/rust-lang/log/commit/c9e5e13e9b02ec80e784c6fe4deacdc8f3194fca While using the #[track_caller] attribute with the following function: #[track_caller] pub fn loc() -> &'static Location<'static> { Location::caller() } it seems that in some cases, the log outputs might include absolute file paths instead of relative paths.