rb(3erl)
rb(3erl) β Erlang Module Definition π
okay bestie, we are literally in the Erlang manual era and this one is all about the report browser. Letβs get into it. π
πΈ NAME πΈ
rb β The Report Browser Tool. Periodt. Itβs the tool for browsing and formatting error reports written by the error logger handler log_mf_h in STDLIB. π¦
π DESCRIPTION π
The Report Browser (RB) tool is used to browse and format error reports written by the error logger handler log_mf_h in STDLIB. Thatβs the whole vibe: reports go in, pretty browsable report energy comes out. β¨
π₯ EXPORTS π₯
π
filter(Filters) / filter(Filters, Dates)
Types, bestie:
Filters = [filter()]
filter() = {Key, Value} | {Key, Value, no} | {Key, RegExp, re}
| {Key, RegExp, re, no}
Key = term()
Value = term()
RegExp = string() | {string(), Options} | re:mp() | {re:mp(),
Options}
Dates = {DateFrom, DateTo} | {DateFrom, from} | {DateTo, to}
DateFrom = DateTo = calendar:datetime()
Displays the reports that match the provided filters. Iconic.
When a filter includes the no atom, it excludes the reports that match that filter. So no is lowkey the βnot this oneβ flag. π
The reports are matched using the proplists module in STDLIB. The report must be a proplist to be matched against any of the filters.
If the filter has the form {Key, RegExp, re}, the report must contain an element with key equal to Key and the value must match the regular expression RegExp.
If parameter Dates is specified, the reports are filtered according to the date when they occurred. If Dates has the form {DateFrom, from}, reports that occurred after DateFrom are displayed.
If Dates has the form {DateTo, to}, reports that occurred before DateTo are displayed.
If two Dates are specified, reports that occurred between those dates are returned. Date-filtering ate.
To filter only by dates, specify the empty list as the Filters parameter.
For details about parameter RegExp, see rb:grep/1.
For details about data type mp(), see re:mp().
For details about data type datetime(), see calendar:datetime().
π grep(RegExp)
Types:
RegExp = string() | {string(), Options} | re:mp() | {re:mp(),
Options}
All reports matching the regular expression RegExp are displayed. RegExp can be any of the following:
- 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
For a definition of valid regular expressions and options, see the re module in STDLIB and in particular function re:run/3.
For details about data type mp(), see re:mp().
π«Ά h() / help()
Displays online help information. Helpful queen behavior. π
π list() / list(Type)
Types:
Type = type()
type() = error | error_report | info_msg | info_report |
warning_msg | warning_report | crash_report |
supervisor_report | progress
Lists all reports loaded in rb_server. Each report is given a unique number that can be used as a reference to the report in function show/1.
If no Type is specified, all reports are listed. No type? No problem, bestie. π
π log_list() / log_list(Type)
Types:
Type = type()
type() = error | error_report | info_msg | info_report |
warning_msg | warning_report | crash_report |
supervisor_report | progress
Same as functions list/0 or list/1, but the result is printed to a log file, if set; otherwise to standard_io.
If no Type is specified, all reports are listed.
π rescan() / rescan(Options)
Types:
Options = [opt()]
Rescans the report directory. Options is the same as for function start/1. Refresh era. β¨
π show() / show(Report)
Types:
Report = integer() | type()
If argument type is specified, all loaded reports of this type are displayed. If an integer argument is specified, the report with this reference number is displayed. If no argument is specified, all reports are displayed. Main character report viewing. π
π start() / start(Options)
Types:
Options = [opt()]
opt() = {start_log, FileName} | {max, MaxNoOfReports} |
{report_dir, DirString} | {type, ReportType} |
{abort_on_error, Bool}
FileName = string() | atom() | pid()
MaxNoOfReports = integer() | all
DirString = string()
ReportType = type() | [type()] | all
Bool = boolean()
Function start/1 starts rb_server with the specified options, whereas function start/0 starts with default options. rb_server must be started before reports can be browsed. When rb_server is started, the files in the specified directory are scanned. The other functions assume that the server has started.
Options, bestie:
{start_log, FileName}β Starts logging to file, registered name, orio_device. All reports are printed to the specified destination. Default isstandard_io. Option{start_log, standard_error}is not allowed and will be replaced by defaultstandard_io.{max, MaxNoOfReports}β Controls how many reportsrb_serveris to read at startup. This option is useful, as the directory can contain a large amount of reports. If this option is specified, theMaxNoOfReportslatest reports are read. Default isall.{report_dir, DirString}β Defines the directory where the error log files are located. Default is the directory specified by application environment variableerror_logger_mf_dir, seesasl(7).{type, ReportType}β Controls what kind of reportsrb_serveris to read at startup.ReportTypeis a supported type,all, or a list of supported types. Default isall.{abort_on_error, Bool}β Specifies if logging is to be ended ifrbencounters an unprintable report. (You can get a report with an incorrect form if functionerror_logger,error_msg, orinfo_msghas been called with an invalid format string.)- If
Boolistrue,rbstops logging (and prints an error message tostdout) if it encounters a badly formatted report. If logging to file is enabled, an error message is appended to the log file as well. - If
Boolisfalse(the default value),rbprints an error message tostdoutfor every bad report it encounters, but the logging process is never ended. All printable reports are written. If logging to file is enabled,rbprints* UNPRINTABLE REPORT *in the log file at the location of an unprintable report.
- If
ποΈ start_log(FileName)
Types:
FileName = string() | atom() | pid()
Redirects all report output from the RB tool to the specified file, registered name, or io_device. Log it, bestie. π
π stop()
Stops rb_server. Bye-bye, server. π
πͺ stop_log()
Closes the log file. The output from the RB tool is directed to standard_io.
Ericsson AB Β· sasl 4.2 Β· rb(3erl) β thatβs the iconic footer sign-off, bestie. π
π¦ where this page comes from
- debian bookworm: erlang-manpages 1:25.2.3+dfsg-1+deb12u1 Β· Apache-2.0
- debian bookworm: erlang-manpages 1:25.2.3+dfsg-1+deb12u4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms