-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tracing-journald: make level mappings configurable #2347
tracing-journald: make level mappings configurable #2347
Conversation
bd18969
to
7673d7c
Compare
217e857
to
ca8c393
Compare
6eb08e5
to
0d2b814
Compare
CI docs builds seem to be failing across the board, so that's unrelated... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some very minor documentation suggestions, but other than that, this looks good to me! thank you!
8470211
to
b86aabc
Compare
I added an example and a test. |
7ab29e7
to
b28463a
Compare
b28463a
to
78e545e
Compare
Hello, |
It needs to be reviewed because I added a test and an example since the first review. |
@t-lintanf also note that this MR is for master currently. If you need this in 0.1, it'll need to be backported. |
ah, sorry i didn't see the most recent changes, my bad! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one last suggestion: i think it makes more sense to put the example on the with_priority_mappings
function's RustDoc, rather than in examples/
. once that's addressed, I think this will be good to merge!
registry | ||
.with( | ||
subscriber | ||
// We can tweak the mappings between the trace level and | ||
// the journal priorities. | ||
.with_priority_mappings(PriorityMappings { | ||
info: Priority::Informational, | ||
..PriorityMappings::new() | ||
}), | ||
) | ||
.init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this example ought to be in the RustDoc documentation for the with_priority_mappings
method, rather than in the general example file.
Hey @little-dude do you think we could get this merged? Otherwise I could pick it up as well... |
@hawkw, @davidbarsky looks like this PR is stale, applied the changes to current master and opened a new PR ( #2824 ). |
This allows to manually map tracing levels to journald levels. It seems that @little-dude, who started the original PR, doesn't have time to finish this, so I picked it up. Reapplied the changes to the newest master branch and fixed the latest comments/issues. This will also fix/close: Closes #2649 Closes #2661 Closes #2347 (the original pr)
This allows to manually map tracing levels to journald levels. It seems that @little-dude, who started the original PR, doesn't have time to finish this, so I picked it up. Reapplied the changes to the newest master branch and fixed the latest comments/issues. This will also fix/close: Closes #2649 Closes #2661 Closes #2347 (the original pr)
This allows to manually map tracing levels to journald levels. It seems that @little-dude, who started the original PR, doesn't have time to finish this, so I picked it up. Reapplied the changes to the newest master branch and fixed the latest comments/issues. This will also fix/close: Closes #2649 Closes #2661 Closes #2347 (the original pr)
This allows to manually map tracing levels to journald levels. It seems that @little-dude, who started the original PR, doesn't have time to finish this, so I picked it up. Reapplied the changes to the newest master branch and fixed the latest comments/issues. This will also fix/close: Closes #2649 Closes #2661 Closes #2347 (the original pr)
This allows to manually map tracing levels to journald levels. It seems that @little-dude, who started the original PR, doesn't have time to finish this, so I picked it up. Reapplied the changes to the newest master branch and fixed the latest comments/issues. This will also fix/close: Closes #2649 Closes #2661 Closes #2347 (the original pr)
This allows to manually map tracing levels to journald levels. It seems that @little-dude, who started the original PR, doesn't have time to finish this, so I picked it up. Reapplied the changes to the newest master branch and fixed the latest comments/issues. This will also fix/close: Closes #2649 Closes #2661 Closes #2347 (the original pr)
Motivation
My company uses different conventions to map tracing levels to journald priorities. I need to be able to configure the mappings to integrate with existing services.
Solution
Do not hardcode the mappings. Instead store the mappins to use in the subscriber.