From a9a6b803a60793d42a74e0f1693a7594dffb6bc3 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Thu, 17 May 2018 18:19:57 +0200
Subject: Improve documentation of logger and error_logger
---
lib/sasl/doc/src/error_logging.xml | 52 +++++++++++++++++++++++++++++++-------
lib/sasl/doc/src/sasl_app.xml | 9 ++++---
2 files changed, 49 insertions(+), 12 deletions(-)
(limited to 'lib/sasl/doc')
diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml
index 4b2c960bbb..44506ffdad 100644
--- a/lib/sasl/doc/src/error_logging.xml
+++ b/lib/sasl/doc/src/error_logging.xml
@@ -32,22 +32,51 @@
B
error_logging.xml
+
+ The SASL error logging concept desribed in this section is
+ deprecated since OTP-21, when the
+ new logging
+ API was introduced.
+ The new default behaviour is that the SASL application no
+ longer affects which log events that are logged.
+ Supervisor
+ reports and crash
+ reports are logged via the default logger handler
+ which is setup by
+ Kernel. Progress
+ reports are by default not logged, but can be enabled
+ by setting the Kernel configuration
+ parameter
+ logger_log_progress to true.
+ The old SASL error logging behaviour can be re-enabled by setting the
+ Kernel configuration
+ parameter
+ logger_sasl_compatible to true.
+ The mechanism
+ for multi-file error report
+ logging as described in this section is also kept for
+ backwards compatibility. However, the new logging API also
+ introduces
+ logger_disk_log_h(3), which is a logger
+ handler that can print to multiple files
+ using disk_log(3).
+
+
+
+ SASL reports
The SASL application introduces three types of reports:
- Supervisor report
- Progress report
- Crash report
- When the SASL application is started, it adds a handler that
- formats and writes these reports, as specified in the configuration
- parameters for SASL, that is, the environment variables
- in the SASL application specification, which is found in the
- .app file of SASL. For details, see the
- sasl(6) application in the
- Reference Manual and the app(4)
- file in the Kernel Reference Manual.
+ When the SASL application is started, it adds a logger handler
+ that formats and writes these reports, as specified in
+ the configuration
+ parameters for SASL
+
Supervisor Report
A supervisor report is issued when a supervised child terminates
unexpectedly. A supervisor report contains the following
@@ -68,6 +97,7 @@
+
Progress Report
A progress report is issued when a supervisor starts or
restarts a child. A progress report contains the following items:
@@ -82,6 +112,7 @@
+
Crash Report
Processes started with functions
proc_lib:spawn or
@@ -105,6 +136,7 @@
crash. The information gathered is the same as the information
for Crasher, described in the previous item.
+
Example
@@ -163,6 +195,7 @@
+
Multi-File Error Report Logging
Multi-file error report logging is used to store error messages
received by error_logger. The error messages
@@ -171,7 +204,8 @@
of files exist at the same time. The logging is very fast, as
each error message is written as a binary term.
For more details, see the
- sasl(6)
+
+ sasl(6)
application in the Reference Manual.
diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index 26b9bece2a..eb1e87d9a3 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -90,20 +90,22 @@
+
Deprecated Error Logger Event Handlers and Configuration
In OTP-21, a new API for logging was added to Erlang/OTP. The
old error_logger event manager, and event handlers
running on this manager, will still work, but they are not used
by default.
The error logger event handlers sasl_report_tty_h
- and sasl_report_file_h, were earliger used for printing
+ and sasl_report_file_h, were earlier used for printing
the so called SASL reports, i.e. supervisor
reports, crash reports, and progress
- reports. These reports are now also printed by the standard
+ reports. These reports are now also printed by the default
logger handler started by the Kernel application. Progress
reports are by default stopped by a filter, but can easily be
added by setting the Kernel configuration
- parameter logger_log_progress=true.
+ parameter
+ logger_log_progress=true.
If the old error logger event handlers are still desired, they
must be added by
calling error_logger:add_report_handler/1,2.
@@ -218,6 +220,7 @@
See Also
alarm_handler(3),
error_logger(3),
+ logger(3),
log_mf_h(3),
rb(3),
release_handler(3),
--
cgit v1.2.3
From ca1bf7a9d915a973203aa046bb9f921c11681ee0 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Mon, 21 May 2018 16:52:23 +0200
Subject: Change handler id for sasl handler from sasl_h to sasl
---
lib/sasl/doc/src/sasl_app.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'lib/sasl/doc')
diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index eb1e87d9a3..0a9e6483f0 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -133,10 +133,10 @@
obtained by setting the Kernel application environment
variable logger_sasl_compatible=true. This will add a
second instance of the standard logger handler
- named sasl_h, which will only print the SASL reports. No
+ named sasl, which will only print the SASL reports. No
SASL reports will then be printed by the Kernel logger
handler.
- The sasl_h handler will be configured according to the
+
The sasl handler will be configured according to the
values of the following SASL application environment
variables.
--
cgit v1.2.3
From 51c6464a011eacd78340b60e2641eaecc36933f6 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Mon, 21 May 2018 17:59:10 +0200
Subject: Change env var logger_log_progress to logger_progress_reports
---
lib/sasl/doc/src/error_logging.xml | 4 ++--
lib/sasl/doc/src/sasl_app.xml | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
(limited to 'lib/sasl/doc')
diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml
index 44506ffdad..8731b73599 100644
--- a/lib/sasl/doc/src/error_logging.xml
+++ b/lib/sasl/doc/src/error_logging.xml
@@ -46,8 +46,8 @@
Kernel. Progress
reports are by default not logged, but can be enabled
by setting the Kernel configuration
- parameter
- logger_log_progress to true.
+ parameter
+ logger_progress_reports to log.
The old SASL error logging behaviour can be re-enabled by setting the
Kernel configuration
parameter
diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index 0a9e6483f0..7f4ceeb354 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -102,10 +102,10 @@
reports, crash reports, and progress
reports. These reports are now also printed by the default
logger handler started by the Kernel application. Progress
- reports are by default stopped by a filter, but can easily be
+ reports are by default stopped by a filter, but can be
added by setting the Kernel configuration
- parameter
- logger_log_progress=true.
+ parameter
+ logger_progress_reports to log.
If the old error logger event handlers are still desired, they
must be added by
calling error_logger:add_report_handler/1,2.
--
cgit v1.2.3
From 53539ee751da408029c9dfae80384fdec6c7a552 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Tue, 22 May 2018 13:22:55 +0200
Subject: Update documentation of logger and error_logger
---
lib/sasl/doc/src/sasl_app.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'lib/sasl/doc')
diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index 7f4ceeb354..be275879ee 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -92,9 +92,9 @@
Deprecated Error Logger Event Handlers and Configuration
- In OTP-21, a new API for logging was added to Erlang/OTP. The
+
In Erlang/OTP 21.0, a new API for logging was added. The
old error_logger event manager, and event handlers
- running on this manager, will still work, but they are not used
+ running on this manager, still work, but they are not used
by default.
The error logger event handlers sasl_report_tty_h
and sasl_report_file_h, were earlier used for printing
--
cgit v1.2.3