Drakulix / simplelog.rs

Simple Logging Facility for Rust
https://docs.rs/simplelog/
Apache License 2.0
424 stars 71 forks source link

Extended functionality for filter_allow and filter_ignore #52

Closed tsidea closed 4 years ago

tsidea commented 4 years ago

By using the target() method instead of module_path() we can extend the functionality of the add_filter_allow and add_filter_ignore to the case where the target is set manually and not defaulted to the module_path. This preserves the current functionality since if that target is not set, it defaults to the module_path as per the log crate spec:

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.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+1.3%) to 61.675% when pulling 7648343bd71dd2a631fb063a76af63a07d6cf754 on tsidea:master into a2fb65500ac25dfdc2f0ede5174c1a29c6536c57 on Drakulix:master.