From d42e6f24eec74299253039f969b69c532877ceb9 Mon Sep 17 00:00:00 2001 From: crownedgrouse Date: Sat, 13 Jul 2013 23:58:44 +0200 Subject: Add Fd usage in rb logging rb was only accepting physical filenames as log file. This patch allow rb to accept now any io_device, valid registered name, except standard_error which is replaced by standard_io. Creation of two new exported functions : rb:log_list/0-1 that print in log file if existing, otherwise on standard_io. Add new functions documentation and tests in rb_SUITE. --- lib/sasl/doc/src/rb.xml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'lib/sasl/doc') diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml index 3da825878e..bfde58eac5 100644 --- a/lib/sasl/doc/src/rb.xml +++ b/lib/sasl/doc/src/rb.xml @@ -137,6 +137,25 @@

+ + + log_list() + log_list(Type) + Log reports list + + Type = type() + type() = error | error_report | info_msg | info_report | + warning_msg | warning_report | crash_report | + supervisor_report | progress + + +

Same as list/0 or list/1 functions + but result is printed to logfile, if set, otherwise to standard_io. +

+

If no Type is given, all reports are listed. +

+
+
rescan() rescan(Options) @@ -172,7 +191,7 @@ Options = [opt()] opt() = {start_log, FileName} | {max, MaxNoOfReports} | {report_dir, DirString} | {type, ReportType} | {abort_on_error, Bool} - FileName = string() | standard_io + FileName = string() | atom() | pid() MaxNoOfReports = int() | all DirString = string() ReportType = type() | [type()] | all @@ -185,11 +204,13 @@ reports can be browsed. When the rb_server is started, the files in the specified directory are scanned. The other functions assume that the server has - started. + started.

-

{start_log, FileName} starts logging to file. All - reports will be printed to the named file. The default is - standard_io. +

{start_log, FileName} starts logging to file, + registered name or io_device. All reports will be printed + to the named file. The default is standard_io. + The option {start_log, standard_error} is not allowed and + will be replaced by default standard_io.

{max, MaxNoOfReports}. Controls how many reports the rb_server should read on start-up. This option is @@ -226,11 +247,11 @@ start_log(FileName) Redirect all output to FileName - FileName = string() + FileName = string() | atom() | pid()

Redirects all report output from the RB tool to the - specified file. + specified file, registered name or io_device.

-- cgit v1.2.3