-
Notifications
You must be signed in to change notification settings - Fork 15
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
Dismiss log messages based on the log level and other small improvements #7
Conversation
Log messages that do not have a log level at least as low as the one of the streamer will not be forwarded.
lib.rs
Outdated
} | ||
|
||
impl Streamer3164 { | ||
/// Create new syslog ``Streamer` using given `format` | ||
pub fn new(logger: Box<syslog::Logger>) -> Self { | ||
pub fn new(logger: Box<syslog::Logger>, level: Level) -> Self { |
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.
This would a backward-incompat. change. Do we need to bump the version? Alternatively, you could introduce a new method, and leave this one as is.
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 it would be better if I were to introduce a new method and leave that one as it is, with a documented sane default log level(maybe one that has something to do with the slog feature for max log level for debug and release builds).
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.
Regarding the version bump, I noticed there is a TODO, this issue slog-rs/slog#261 and a missing Streamer5424
. Does this library accept contributions? I'd like to look into those issues myself, if there is nobody else on the task.
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 am always happy to accept PRs.
e70eae2
to
bf872a4
Compare
Log messages that do not have a log level at least as low as the one of
the streamer will not be forwarded.
Update
try!()
macros to new?
syntax.Explictly specify dyn trait object in
Format3164::format
.