|
The function filter/2 expects a second parameter
Dates that can be used to return reports that
occurred between the provided dates.
Usage:
Dec22 = {{2009,12,22},{0,0,0}}.
Dec24 = {{2009,12,24},{0,0,0}}.
rb:filter(Filters, {Dec22, from}).
%will return reports that occurred from Dec22.
rb:filter(Filters, {Dec22, to}).
%will return reports that occurred before Dec22.
rb:filter(Filters, {Dec22, Dec24}).
%will return reports that occurred between Dec22
% and Dec24
|
|
Currently in the rb module the only way to filter
reports is by using the grep/1 or re/1 functions
that use Regular Expressions.
This new function allow us to specify detailed
filters that will match against our reports.
Since the reports are proplists the filters are
tuples of the form {Key, Value}. If the report
contains that tuple, it will be displayed.
Usage:
1> rb:filter([{"foo", "bar"}, {"abc", "value"}]).
2> rb:filter([{"foo", "bar", no}]).
% excludes reports containing {"foo", "bar"}
3> rb:filter([{"foo", RegExp, re}]).
% the report must contain an element with Key = "foo"
% and Value must match RegExp
|