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 --- system/doc/reference_manual/introduction.xml | 2 +- system/doc/system_principles/error_logging.xml | 113 ++++++++++----------- system/doc/system_principles/system_principles.xml | 2 +- 3 files changed, 53 insertions(+), 64 deletions(-) (limited to 'system') diff --git a/system/doc/reference_manual/introduction.xml b/system/doc/reference_manual/introduction.xml index afbdfa7434..c9f5fcb2db 100644 --- a/system/doc/reference_manual/introduction.xml +++ b/system/doc/reference_manual/introduction.xml @@ -48,7 +48,7 @@ System Principles

Starting and stopping, boot scripts, code loading, - error logging, + logging, creating target systems

diff --git a/system/doc/system_principles/error_logging.xml b/system/doc/system_principles/error_logging.xml index c99d59ddb7..ee3d68d80e 100644 --- a/system/doc/system_principles/error_logging.xml +++ b/system/doc/system_principles/error_logging.xml @@ -39,80 +39,69 @@ with exit value: {{badmatch,[1,2,3]},[{m,f,1},{shell,eval_loop,2}]}]]> -

The error information is handled by the error logger, a - system process registered as error_logger. This process - receives all error messages from the Erlang runtime system as - well as from the standard behaviours and different Erlang/OTP - applications.

+

The error information is handled by Logger, which is part of + the Kernel application.

The exit reasons (such as badarg) used by the runtime system are described in Errors and Error Handling.

-

For information about the process error_logger and its user - interface (with the same name), see the - error_logger(3) - manual page in Kernel. The system can be configured so that - error information - is written to file or to tty, or both. In addition, user-defined - applications can send and format error information using - error_logger.

+

For information about Logger and its user + interface, see the + logger(3) + manual page and + the Logging + section in the Kernel User's Guide. The system can be configured so that + log events are + written to file or to tty, or both. In addition, user-defined + applications can send and format log events using + Logger.

- SASL Error Logging + Log events from OTP behaviours

The standard behaviours (supervisor, gen_server, - and so on) send progress and error information to error_logger. - If the SASL application is started, this information is - written to tty as well. For more information, see + and so on) send progress and error information to + Logger. Progress reports are by default not logged, but can be + enabled by setting the Kernel configuration + parameter logger_log_progress to true. Supervisor + reports, crash reports and other error and information reports + are by default logged through the log handler which is + set up when the Kernel application is started.

+

Prior to OTP-21, supervisor, crash, and progress reports were + only logged when the SASL application was running. This + behaviour can, for backwards compatibility, be enabled by + setting the Kernel configuration + parameter logger_sasl_compatible to true. For more + information, see SASL Error Logging in the SASL User's Guide.

-% erl -boot start_sasl
-Erlang (BEAM) emulator version 5.4.13 [hipe] [threads:0] [kernel-poll]
+% erl -kernel logger_log_progress true
+Erlang/OTP 21 [erts-10.0] [source-76388a1] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
 
-
-=PROGRESS REPORT==== 31-Mar-2006::12:45:58 ===
-          supervisor: {local,sasl_safe_sup}
-             started: [{pid,<0.33.0>},
-                       {name,alarm_handler},
-                       {mfa,{alarm_handler,start_link,[]}},
-                       {restart_type,permanent},
-                       {shutdown,2000},
-                       {child_type,worker}]
-
-=PROGRESS REPORT==== 31-Mar-2006::12:45:58 ===
-          supervisor: {local,sasl_safe_sup}
-             started: [{pid,<0.34.0>},
-                       {name,overload},
-                       {mfa,{overload,start_link,[]}},
-                       {restart_type,permanent},
-                       {shutdown,2000},
-                       {child_type,worker}]
-
-=PROGRESS REPORT==== 31-Mar-2006::12:45:58 ===
-          supervisor: {local,sasl_sup}
-             started: [{pid,<0.32.0>},
-                       {name,sasl_safe_sup},
-                       {mfa,{supervisor,
-                                start_link,
-                                [{local,sasl_safe_sup},sasl,safe]}},
-                       {restart_type,permanent},
-                       {shutdown,infinity},
-                       {child_type,supervisor}]
-
-=PROGRESS REPORT==== 31-Mar-2006::12:45:58 ===
-          supervisor: {local,sasl_sup}
-             started: [{pid,<0.35.0>},
-                       {name,release_handler},
-                       {mfa,{release_handler,start_link,[]}},
-                       {restart_type,permanent},
-                       {shutdown,2000},
-                       {child_type,worker}]
-
-=PROGRESS REPORT==== 31-Mar-2006::12:45:58 ===
-         application: sasl
-          started_at: nonode@nohost
-Eshell V5.4.13  (abort with ^G)
+=PROGRESS REPORT==== 18-May-2018::21:33:41.705292 ===
+    application: kernel
+    started_at: nonode@nohost
+=PROGRESS REPORT==== 18-May-2018::21:33:41.708900 ===
+    application: stdlib
+    started_at: nonode@nohost
+=PROGRESS REPORT==== 18-May-2018::21:33:41.726003 ===
+    supervisor: {local,kernel_safe_sup}
+    started: [{pid,<0.75.0>},
+              {id,disk_log_sup},
+              {mfargs,{disk_log_sup,start_link,[]}},
+              {restart_type,permanent},
+              {shutdown,1000},
+              {child_type,supervisor}]
+=PROGRESS REPORT==== 18-May-2018::21:33:41.726348 ===
+    supervisor: {local,kernel_safe_sup}
+    started: [{pid,<0.76.0>},
+              {id,disk_log_server},
+              {mfargs,{disk_log_server,start_link,[]}},
+              {restart_type,permanent},
+              {shutdown,2000},
+              {child_type,worker}]
+Eshell V9.3.1  (abort with ^G)
 1> 
diff --git a/system/doc/system_principles/system_principles.xml b/system/doc/system_principles/system_principles.xml index 3605df3ade..b3981f0735 100644 --- a/system/doc/system_principles/system_principles.xml +++ b/system/doc/system_principles/system_principles.xml @@ -93,7 +93,7 @@ init:stop() {progress,kernel_load_completed} {progress,modules_loaded} {start,heart} -{start,error_logger} +{start,logger} ...

For a detailed description of the syntax and contents of the boot script, see the script(4) manual page in SASL.

-- 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 --- system/doc/system_principles/error_logging.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/doc/system_principles/error_logging.xml b/system/doc/system_principles/error_logging.xml index ee3d68d80e..2e28753c02 100644 --- a/system/doc/system_principles/error_logging.xml +++ b/system/doc/system_principles/error_logging.xml @@ -63,7 +63,7 @@ Error in process <0.27.0> with exit value: {{badmatch,[1,2,3]},[{m,f,1},{shell,e and so on) send progress and error information to Logger. Progress reports are by default not logged, but can be enabled by setting the Kernel configuration - parameter logger_log_progress to true. Supervisor + parameter logger_progress_reports to log. Supervisor reports, crash reports and other error and information reports are by default logged through the log handler which is set up when the Kernel application is started.

@@ -76,7 +76,7 @@ Error in process <0.27.0> with exit value: {{badmatch,[1,2,3]},[{m,f,1},{shell,e SASL Error Logging in the SASL User's Guide.

-% erl -kernel logger_log_progress true
+% erl -kernel logger_progress_reports log
 Erlang/OTP 21 [erts-10.0] [source-76388a1] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
 
 =PROGRESS REPORT==== 18-May-2018::21:33:41.705292 ===
-- 
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

---
 system/doc/system_principles/error_logging.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'system')

diff --git a/system/doc/system_principles/error_logging.xml b/system/doc/system_principles/error_logging.xml
index 2e28753c02..9d95ce8f3b 100644
--- a/system/doc/system_principles/error_logging.xml
+++ b/system/doc/system_principles/error_logging.xml
@@ -67,10 +67,10 @@ Error in process <0.27.0> with exit value: {{badmatch,[1,2,3]},[{m,f,1},{shell,e
       reports, crash reports and other error and information reports
       are by default logged through the log handler which is
       set up when the Kernel application is started.

-

Prior to OTP-21, supervisor, crash, and progress reports were - only logged when the SASL application was running. This - behaviour can, for backwards compatibility, be enabled by - setting the Kernel configuration +

Prior to Erlang/OTP 21.0, supervisor, crash, and progress + reports were only logged when the SASL application was + running. This behaviour can, for backwards compatibility, be + enabled by setting the Kernel configuration parameter logger_sasl_compatible to true. For more information, see SASL Error Logging -- cgit v1.2.3