Age | Commit message (Collapse) | Author |
|
There was an inconsistency in the filter function, as
filter([{Key,Regexp,re,no}]) did not work in the same way as
filter([{Key,Value,no}])
The first filter only returned 'proplist' reports, while the second
returned *all* reports that didn't match the Value. This has been
corrected so both filters now return all reports that don't match.
|
|
After a bug fix supervisor does no longer save childspecs for
temporary children. Due to this, all calls to supervisor:delete_child
will fail for temporary children. rb:stop is therefore now rewritten
to only do supervisor:terminate_child.
|
|
rb:stop did sometimes return {error,running}.
This came from supervisor:delete_child and happened when the rb_server
has not yet terminated when this function was called. Instead of
having a separate gen_server call to rb_server for stopping the
process, supervisor:terminate_child is now called. This is a
synchronous function - i.e. it waits for the process to actually
terminate before it returns.
A file descriptor leak in rb:scan_files is corrected. The index file
was never closed after reading.
|
|
Start and end date for rb:filter/2 was specified as {{Y-M-D},...} in
the help text instead of {{Y,M,D},...}. This has been corrected.
|
|
gen_server:call/2,3 now sets up a monitor to make sure that
it will be noticed if the called process dies. Therefore,
there is almost never a good reason to use gen_server:call/2
with its default 5 seconds timeout. Use gen_server:call/3
with the 'infinity' timeout instead.
To make sure we use the 'infinity' timeout every time,
wrap the to call gen_server:call/3 in a local call/1 function
in each module.
|
|
* va/rb-improvements:
New rb:filter/2 to filter reports by date
New rb:filter/1 function to ease report filtering
Modify rb:grep/1 to grep reports using the re module
Fix minor typo in read_report/1
OTP-8443 The re:grep/1 function now uses the 're' module instead of the
deprecated 'regexp' module. There are new functions rb:filter/1
and rb:filter/2 for easier filtering of reports. (Thanks to
Alvaro Videla.)
|
|
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
|
|
|
|
|
|
|