1rb(3) Erlang Module Definition rb(3)
2
3
4
6 rb - The Report Browser Tool
7
9 The Report Browser (RB) tool is used to browse and format error reports
10 written by the error logger handler log_mf_h in STDLIB.
11
13 filter(Filters)
14 filter(Filters, Dates)
15
16 Types:
17
18 Filters = [filter()]
19 filter() = {Key, Value} | {Key, Value, no} | {Key, RegExp,
20 re} | {Key, RegExp, re, no}
21 Key = term()
22 Value = term()
23 RegExp = string() | {string(), Options} | re:mp() | {re:mp(),
24 Options}
25 Dates = {DateFrom, DateTo} | {DateFrom, from} | {DateTo, to}
26 DateFrom = DateTo = calendar:datetime()
27
28 Displays the reports that match the provided filters.
29
30 When a filter includes the no atom, it excludes the reports that
31 match that filter.
32
33 The reports are matched using the proplists module in STDLIB.
34 The report must be a proplist to be matched against any of the
35 filters.
36
37 If the filter has the form {Key, RegExp, re}, the report must
38 contain an element with key equal to Key and the value must
39 match the regular expression RegExp.
40
41 If parameter Dates is specified, the reports are filtered ac‐
42 cording to the date when they occurred. If Dates has the form
43 {DateFrom, from}, reports that occurred after DateFrom are dis‐
44 played.
45
46 If Dates has the form {DateTo, to}, reports that occurred before
47 DateTo are displayed.
48
49 If two Dates are specified, reports that occurred between those
50 dates are returned.
51
52 To filter only by dates, specify the empty list as the Filters
53 parameter.
54
55 For details about parameter RegExp, see rb:grep/1.
56
57 For details about data type mp(), see re:mp().
58
59 For details about data type datetime(), see calendar:datetime().
60
61 grep(RegExp)
62
63 Types:
64
65 RegExp = string() | {string(), Options} | re:mp() | {re:mp(),
66 Options}
67
68 All reports matching the regular expression RegExp are dis‐
69 played. RegExp can be any of the following:
70
71 * A string containing the regular expression
72
73 * A tuple with the string and the options for compilation
74
75 * A compiled regular expression
76
77 * A compiled regular expression and the options for running it
78
79 For a definition of valid regular expressions and options, see
80 the re module in STDLIB and in particular function re:run/3.
81
82 For details about data type mp(), see re:mp().
83
84 h()
85 help()
86
87 Displays online help information.
88
89 list()
90 list(Type)
91
92 Types:
93
94 Type = type()
95 type() = error | error_report | info_msg | info_report |
96 warning_msg | warning_report | crash_report | supervisor_re‐
97 port | progress
98
99 Lists all reports loaded in rb_server. Each report is given a
100 unique number that can be used as a reference to the report in
101 function show/1.
102
103 If no Type is specified, all reports are listed.
104
105 log_list()
106 log_list(Type)
107
108 Types:
109
110 Type = type()
111 type() = error | error_report | info_msg | info_report |
112 warning_msg | warning_report | crash_report | supervisor_re‐
113 port | progress
114
115 Same as functions list/0 or list/1, but the result is printed to
116 a log file, if set; otherwise to standard_io.
117
118 If no Type is specified, all reports are listed.
119
120 rescan()
121 rescan(Options)
122
123 Types:
124
125 Options = [opt()]
126
127 Rescans the report directory. Options is the same as for func‐
128 tion start/1.
129
130 show()
131 show(Report)
132
133 Types:
134
135 Report = integer() | type()
136
137 If argument type is specified, all loaded reports of this type
138 are displayed. If an integer argument is specified, the report
139 with this reference number is displayed. If no argument is spec‐
140 ified, all reports are displayed.
141
142 start()
143 start(Options)
144
145 Types:
146
147 Options = [opt()]
148 opt() = {start_log, FileName} | {max, MaxNoOfReports} | {re‐
149 port_dir, DirString} | {type, ReportType} | {abort_on_error,
150 Bool}
151 FileName = string() | atom() | pid()
152 MaxNoOfReports = integer() | all
153 DirString = string()
154 ReportType = type() | [type()] | all
155 Bool = boolean()
156
157 Function start/1 starts rb_server with the specified options,
158 whereas function start/0 starts with default options. rb_server
159 must be started before reports can be browsed. When rb_server is
160 started, the files in the specified directory are scanned. The
161 other functions assume that the server has started.
162
163 Options:
164
165 {start_log, FileName}:
166 Starts logging to file, registered name, or io_device. All
167 reports are printed to the specified destination. Default is
168 standard_io. Option {start_log, standard_error} is not al‐
169 lowed and will be replaced by default standard_io.
170
171 {max, MaxNoOfReports}:
172 Controls how many reports rb_server is to read at startup.
173 This option is useful, as the directory can contain a large
174 amount of reports. If this option is specified, the
175 MaxNoOfReports latest reports are read. Default is all.
176
177 {report_dir, DirString}:
178 Defines the directory where the error log files are located.
179 Default is the directory specified by application environ‐
180 ment variable error_logger_mf_dir, see sasl(6).
181
182 {type, ReportType}:
183 Controls what kind of reports rb_server is to read at
184 startup. ReportType is a supported type, all, or a list of
185 supported types. Default is all.
186
187 {abort_on_error, Bool}:
188 Specifies if logging is to be ended if rb encounters an un‐
189 printable report. (You can get a report with an incorrect
190 form if function error_logger, error_msg, or info_msg has
191 been called with an invalid format string)
192
193 * If Bool is true, rb stops logging (and prints an error
194 message to stdout) if it encounters a badly formatted re‐
195 port. If logging to file is enabled, an error message is
196 appended to the log file as well.
197
198 * If Bool is false (the default value), rb prints an error
199 message to stdout for every bad report it encounters, but
200 the logging process is never ended. All printable reports
201 are written. If logging to file is enabled, rb prints *
202 UNPRINTABLE REPORT * in the log file at the location of an
203 unprintable report.
204
205 start_log(FileName)
206
207 Types:
208
209 FileName = string() | atom() | pid()
210
211 Redirects all report output from the RB tool to the specified
212 file, registered name, or io_device.
213
214 stop()
215
216 Stops rb_server.
217
218 stop_log()
219
220 Closes the log file. The output from the RB tool is directed to
221 standard_io.
222
223
224
225Ericsson AB sasl 4.2.1 rb(3)