Skip to content
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

Merged
merged 5 commits into from
Feb 2, 2021

Conversation

cezarmathe
Copy link
Contributor

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.

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 {
Copy link
Contributor

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.

Copy link
Contributor Author

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).

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@dpc dpc merged commit c9d6422 into slog-rs:master Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants