File: error_logging.html

package info (click to toggle)
erlang-doc-html 1%3A11.b.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 23,284 kB
  • ctags: 10,724
  • sloc: erlang: 505; ansic: 323; makefile: 62; perl: 61; sh: 45
file content (110 lines) | stat: -rw-r--r-- 4,348 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
  <TITLE>Error Logging</TITLE>
  <SCRIPT type="text/javascript" src="../../doc/erlresolvelinks.js">
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
      ALINK="#FF0000">
<CENTER>
<A HREF="http://www.erlang.se"><IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif"></A>
</CENTER>
<A NAME="2"><!-- Empty --></A>
<H2>2 Error Logging</H2>
<A NAME="2.1"><!-- Empty --></A>
<H3>2.1 Error Information From the Runtime System</H3>

<P>Error information from the runtime system, that is, information
about a process terminating due to an uncaught error exception,
is by default written to terminal (tty):
<PRE>
=ERROR REPORT==== 9-Dec-2003::13:25:02 ===
Error in process &#60;0.27.0&#62; with exit value: {{badmatch,[1,2,3]},[{m,f,1},{shell,eval_loop,2}]}
    
</PRE>

<P>The error information is handled by the <STRONG>error logger</STRONG>, a
system process registered as <CODE>error_logger</CODE>. This process
receives all error messages from the Erlang runtime system and
also from the standard behaviours and different Erlang/OTP
applications.
<P>The exit reasons (such as <CODE>badarg</CODE> above) used by
the runtime system are described in
<A HREF="javascript:erlhref('../../', 'doc/reference_manual', 'errors.html#exit_reasons');">Errors and Error Handling</A>
in the Erlang Reference Manual.
<P>The process <CODE>error_logger</CODE> and its user interface (with
the same name) are described in
<A HREF="javascript:erlhref('../../', 'kernel', 'error_logger.html');">error_logger(3)</A>.
It is possible to configure the system so that error information
is written to file instead/as well as tty. Also, it is possible
for user defined applications to send and format error
information using <CODE>error_logger</CODE>.<A NAME="2.2"><!-- Empty --></A>
<H3>2.2 SASL Error Logging</H3>

<P>The standard behaviors (<CODE>supervisor</CODE>, <CODE>gen_server</CODE>,
etc.) sends progress and error information to <CODE>error_logger</CODE>.
If the SASL application is started, this information is written
to tty as well. See
<A HREF="javascript:erlhref('../../', 'sasl', 'error_logging.html');">SASL Error Logging</A>
in the SASL User's Guide for further information.
<PRE>
% <STRONG>erl -boot start_sasl</STRONG>
Erlang (BEAM) emulator version 5.4.13 [hipe] [threads:0] [kernel-poll]


=PROGRESS REPORT==== 31-Mar-2006::12:45:58 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,&#60;0.33.0&#62;},
                       {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,&#60;0.34.0&#62;},
                       {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,&#60;0.32.0&#62;},
                       {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,&#60;0.35.0&#62;},
                       {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)
1&#62; 
    
</PRE>
<CENTER>
<HR>
<SMALL>
Copyright &copy; 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>