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