Proposal: Extend log crate with contextual, typed, and fatal-level logging #700
Labels
No labels
bug
duplicate
easy
enhancement
help wanted
invalid
question
rfc
structured-logging
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-rust-lang/log#700
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation: Automotive Use Case
Benefits
Note that target != module path, though it's the default. You can set the target yourself:
info!(target: "my target"). I've personally used this for access log set a specifictargetwhich can then be used for filtering later.I think this will add quite a bit of overhead if this entire hierarchy needs to be kept in memory. What I do is add an id to each log so they can be grouped. My use case is handling requests so it's easy, an id per request, I don't know what an equivalent would be in automotive software though. Would something like this be possible for your use case?
Have you tried key-value logging: https://docs.rs/log/latest/log/kv/index.html, it's fully typed.
Duplicate of #334, which discusses adding additional logging level.
This seems to be an insatnce of Logforth's (thread-local) Diagnostic and needs not to be a feature in
log.From your description, this can be resolved either: