Geal / rust-syslog

Send syslog messages from Rust
MIT License
109 stars 55 forks source link

fix(log): add log filtering #84

Closed igiona closed 1 month ago

igiona commented 3 months ago

Added log filtering to this crate. As described in the Log trait documentation, the log-implementation is responsible for filtering the logs:

https://github.com/rust-lang/log/blob/c879b011a8ac662545adf9484d9a668ebcf9b814/src/lib.rs#L1178C6-L1182

    /// Logs the `Record`.
    ///
    /// # For implementors
    ///
    /// Note that `enabled` is *not* necessarily called before this method.
    /// Implementations of `log` should perform all necessary filtering
    /// internally.
    fn log(&self, record: &Record);
Geal commented 1 month ago

thanks!