Closed ryankurte closed 5 years ago
Thanks! This looks like a good approach / feature, I will give it a real review sometime next week and likely merge and release it then.
Merged manually with #37
is there any reason why filtering is based on Record::module_path and not Record::target, as suggested in the log crate?
... A log request consists of a target, a level, and a body. A target is a string which defaults to the module path of the location of the log request, though that default may be overridden. Logger implementations typically use the target to filter requests based on some user configuration. ...
This allows the specification of a allowed or ignored modules for logging using the configuration
filter_allow
andfilter_ignore
fields, somewhat mitigating #3.As this introduces new fields to an object that can be publicly constructed (eg. using
Config{..}
), this is a breaking change. If you wanted to mitigate this in future i would suggest moving to a builder pattern for constructing theConfig
object and adding a private field to disable public construction.