Closed Emilgardis closed 4 years ago
This PR adds some more ways to output log invocation site.
I would not recommend this for usage in releases, but for local development it's very handy to be able to use something like VSCode ctrl clicking on file:line to go to that location in file.
Produces
"module" => "/path/to/bla/that/may/be/relative/or/not.rs:7"
This produces for logs where std::file!() reported with a relative path, e.g when log is made by workspace member
std::file!()
"module" => "my_crate/src/lib.rs:42"
and else
"module" => "foo_crate::module::bar:101"
One thing to think about is if still calling it module is appropriate, maybe calling the key "file" is more appropriate?
Published: v0.3.6
This PR adds some more ways to output log invocation site.
I would not recommend this for usage in releases, but for local development it's very handy to be able to use something like VSCode ctrl clicking on file:line to go to that location in file.
FileAndLine
Produces
LocalFileAndLine
This produces for logs where
std::file!()
reported with a relative path, e.g when log is made by workspace memberand else
Note
One thing to think about is if still calling it module is appropriate, maybe calling the key "file" is more appropriate?