aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/doc/src/rb.xml
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-02-16 07:37:52 +0000
committerErlang/OTP <[email protected]>2010-02-16 07:37:52 +0000
commitad8ff2174e6ed4becb0a267f82c9f0163142f147 (patch)
tree1fd439d39d21fcfb5ea45d7f90f6dc4bf08aa291 /lib/sasl/doc/src/rb.xml
parent7aa2cb2e64cd404f8a9f388d85ab287ced95f139 (diff)
parent242c70ed5f0e2b84e9608bace183052e745614ed (diff)
downloadotp-ad8ff2174e6ed4becb0a267f82c9f0163142f147.tar.gz
otp-ad8ff2174e6ed4becb0a267f82c9f0163142f147.tar.bz2
otp-ad8ff2174e6ed4becb0a267f82c9f0163142f147.zip
Merge branch 'va/rb-improvements' into ccase/r13b04_dev
* 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.)
Diffstat (limited to 'lib/sasl/doc/src/rb.xml')
-rw-r--r--lib/sasl/doc/src/rb.xml86
1 files changed, 67 insertions, 19 deletions
diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml
index 5b49a7bced..f35ceb5777 100644
--- a/lib/sasl/doc/src/rb.xml
+++ b/lib/sasl/doc/src/rb.xml
@@ -4,23 +4,21 @@
<erlref>
<header>
<copyright>
- <year>1996</year>
- <year>2007</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
+ <year>1996</year><year>2010</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
- The Initial Developer of the Original Code is Ericsson AB.
</legalnotice>
<title>rb</title>
@@ -43,20 +41,70 @@
</description>
<funcs>
<func>
+ <name>filter(Filters)</name>
+ <name>filter(Filters, Dates)</name>
+ <fsummary>Filter reports and displays them on the screen</fsummary>
+ <type>
+ <v>Filters = [filter()]</v>
+ <v>filter() = {Key, Value} | {Key, Value, no} | {Key, RegExp, re} | {Key, RegExp, re, no}</v>
+ <v>Key = term()</v>
+ <v>Value = term()</v>
+ <v>RegExp = string() | {string, Options} | mp(), {mp(), Options}</v>
+ <v>Dates = {DateFrom, DateTo} | {DateFrom, from} | {DateTo, to}</v>
+ <v>DateFrom = DateTo = {date(), time()}</v>
+ <v>date() and time() are the same type as in the <c>calendar</c> module</v>
+ </type>
+ <desc>
+ <p>This function displays the reports that match the provided filters.</p>
+ <p>
+ When a filter includes the <c>no</c> atom it will exclude the reports that match
+ that filter.
+ </p>
+ <p>
+ The reports are matched using the <c>proplists</c> module. The report must be a proplist
+ to be matched against any of the <c>filters()</c>.
+ </p>
+ <p>
+ If the filter is of the form <c>{Key, RegExp, re}</c> the report must contain an element with
+ <c>key = Key</c> and <c>Value</c> must match the RegExp regular expression.
+ </p>
+ <p>
+ If the Dates parameter is provided, then the reports are filtered according to the date
+ when they occurred. If Dates is of the form <c>{DateFrom, from}</c> then reports that occurred
+ after DateFrom are displayed.
+ </p>
+ <p>
+ If Dates is of the form <c>{DateTo, to}</c> then reports that occurred before DateTo
+ are displayed.
+ </p>
+ <p>
+ If two Dates are provided, then reports that occurred between those dates are returned.
+ </p>
+ <p>
+ If you only want to filter only by dates, then you can provide the empty list as the Filters
+ parameter.
+ </p>
+ <p>
+ See <c>rb:grep/1</c> for more information on the RegExp parameter.
+ </p>
+ </desc>
+ </func>
+ <func>
<name>grep(RegExp)</name>
<fsummary>Search the reports for a regular expression</fsummary>
<type>
- <v>RegExp = string()</v>
+ <v>RegExp = string() | {string, Options} | mp(), {mp(), Options}</v>
</type>
<desc>
<p>All reports containing the regular expression <c>RegExp</c>
are printed.
</p>
- <p><c>RegExp</c> is a string containing the regular
- expression. Refer to the module <c>regexp</c> in the STDLIB
- reference manual
- for a definition of valid regular expressions. They are
- essentially the same as the UNIX command <c>egrep</c>.
+ <p><c>RegExp</c> can be a string containing the regular
+ expression; a tuple with the string and the options for
+ compilation; a compiled regular expression; a compiled
+ regular expression and the options for running it.
+ Refer to the module <c>re</c> and specially the function <c>re:run/3</c>
+ for a definition of valid regular expressions and options.
</p>
</desc>
</func>