diff options
author | Siri Hansen <[email protected]> | 2018-05-24 15:56:07 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-05-24 15:56:07 +0200 |
commit | 4f91c8a34f4cc2c728a63e8d218566b3b3795b10 (patch) | |
tree | 689a206967ccdbf98e2ecf3d67ffa9ab2fcf0a35 /system/doc/system_principles | |
parent | 5c1d8ed81e66ef4977b7b68f573862bcbb9da7ca (diff) | |
parent | 53539ee751da408029c9dfae80384fdec6c7a552 (diff) | |
download | otp-4f91c8a34f4cc2c728a63e8d218566b3b3795b10.tar.gz otp-4f91c8a34f4cc2c728a63e8d218566b3b3795b10.tar.bz2 otp-4f91c8a34f4cc2c728a63e8d218566b3b3795b10.zip |
Merge branch 'siri/logger-fix'
* siri/logger-fix:
Update documentation of logger and error_logger
Change type name logger:log() to logger:log_event()
Update preloaded
Update primary bootstrap
Rename module logger_simple to logger_simple_h
Change env var logger_log_progress to logger_progress_reports
Remove HandlerId from handler callback functions and add it to Config
Change handler id for sasl handler from sasl_h to sasl
Change Compare parameter to logger_filters:domain/2
Update Logger documentation
Rename reset_module_level to unset_module_level
Allow chars_limit to limit strings
Add logger:update_formatter_config/2,3
Set legacy_header=true for kernel's default handler only
Improve documentation of logger and error_logger
Use system_time instead of monotonic_time as timestamp in logger
Diffstat (limited to 'system/doc/system_principles')
-rw-r--r-- | system/doc/system_principles/error_logging.xml | 113 | ||||
-rw-r--r-- | system/doc/system_principles/system_principles.xml | 2 |
2 files changed, 52 insertions, 63 deletions
diff --git a/system/doc/system_principles/error_logging.xml b/system/doc/system_principles/error_logging.xml index c99d59ddb7..9d95ce8f3b 100644 --- a/system/doc/system_principles/error_logging.xml +++ b/system/doc/system_principles/error_logging.xml @@ -39,80 +39,69 @@ <code type="none"><![CDATA[ =ERROR REPORT==== 9-Dec-2003::13:25:02 === Error in process <0.27.0> with exit value: {{badmatch,[1,2,3]},[{m,f,1},{shell,eval_loop,2}]}]]></code> - <p>The error information is handled by the <em>error logger</em>, a - system process registered as <c>error_logger</c>. This process - receives all error messages from the Erlang runtime system as - well as from the standard behaviours and different Erlang/OTP - applications.</p> + <p>The error information is handled by Logger, which is part of + the Kernel application.</p> <p>The exit reasons (such as <c>badarg</c>) used by the runtime system are described in <seealso marker="doc/reference_manual:errors#exit_reasons"> Errors and Error Handling</seealso>.</p> - <p>For information about the process <c>error_logger</c> and its user - interface (with the same name), see the - <seealso marker="kernel:error_logger">error_logger(3)</seealso> - 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 - <c>error_logger</c>.</p> + <p>For information about Logger and its user + interface, see the + <seealso marker="kernel:logger">logger(3)</seealso> + manual page and + the <seealso marker="kernel:logger_chapter">Logging</seealso> + 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.</p> </section> <section> - <title>SASL Error Logging</title> + <title>Log events from OTP behaviours</title> <p>The standard behaviours (<c>supervisor</c>, <c>gen_server</c>, - and so on) send progress and error information to <c>error_logger</c>. - 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 <c>logger_progress_reports</c> to <c>log</c>. 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.</p> + <p>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 <c>logger_sasl_compatible</c> to <c>true</c>. For more + information, see <seealso marker="sasl:error_logging">SASL Error Logging</seealso> in the SASL User's Guide.</p> <pre> -% <input>erl -boot start_sasl</input> -Erlang (BEAM) emulator version 5.4.13 [hipe] [threads:0] [kernel-poll] +% <input>erl -kernel logger_progress_reports log</input> +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> </pre> </section> </chapter> 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()</pre> {progress,kernel_load_completed} {progress,modules_loaded} {start,heart} -{start,error_logger} +{start,logger} ...</pre> <p>For a detailed description of the syntax and contents of the boot script, see the <c>script(4)</c> manual page in SASL.</p> |