riker-rs / riker

Easily build efficient, highly concurrent and resilient applications. An Actor Framework for Rust.
https://riker.rs
MIT License
1.03k stars 69 forks source link

Filter logger #21

Closed kitsuneninetails closed 6 years ago

kitsuneninetails commented 6 years ago

It would be nice to have a filter on the main logger, as sometimes the logging gets pretty verbose when many actors are present using many other libraries which all have logs flowing through. Since the Riker logger is an actor itself, this should be fairly easy to set up.

I was thinking just a simple array of terms which will be filtered out which will then do a simple check on each log. Since this array should hopefully be fairly small, and the logging strings not too large, I was thinking this would be simple but still not too much of a hit performance-wise.

Note: I have a basic implementation of a filter logger with this set up already written. I will post a PR so it can be reviewed.

Thanks!