filter-logger-0.1.0 doesn't have any documentation.
Filter Logger for Rust
This simple logger will filter based on either the module path or the log body in each log line, or both.
to use, simply add the crate to your Cargo.toml
:
[]
= "*"
= "*"
In your source code, initialize the logger with the module filter and body filter (use empty vector for no filter):
extern crate filter_logger;
extern crate log;
use FilterLogger;
The output will be:
<date> <time> INFO [test_log::foo1] This will print out
The filters are a simple string check on either the module_path()
or the args()
parameter
of the record object passed into the log()
function.