aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src/kernel_app.xml
blob: 7894600c21fea336187b0afc9583faa88c2cca85 (plain) (blame)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">

<appref>
  <header>
    <copyright>
      <year>1996</year><year>2018</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

    </legalnotice>

    <title>kernel</title>
    <prepared></prepared>
    <docno></docno>
    <date></date>
    <rev></rev>
  </header>
  <app>kernel</app>
  <appsummary>The Kernel application.</appsummary>
  <description>
    <p>The Kernel application has all the code necessary to run
      the Erlang runtime system: file servers, code servers,
      and so on.</p>
    <p>The Kernel application is the first application started. It is
      mandatory in the sense that the minimal system based on
      Erlang/OTP consists of Kernel and STDLIB. Kernel
      contains the following functional areas:</p>
    <list type="bulleted">
      <item>Start, stop, supervision, configuration, and distribution of applications</item>
      <item>Code loading</item>
      <item>Logging</item>
      <item>Error logging</item>
      <item>Global name service</item>
      <item>Supervision of Erlang/OTP</item>
      <item>Communication with sockets</item>
      <item>Operating system interface</item>
    </list>
  </description>

  <section>
    <title>Logger Handlers</title>
    <p>Two standard logger handlers are defined in
      the Kernel application. These are described in the
      <seealso marker="logger_chapter">Kernel User's Guide</seealso>,
      and in <seealso marker="logger_std_h"><c>logger_std_h(3)</c></seealso>
      and <seealso marker="logger_disk_log_h"><c>logger_disk_log_h(3)</c>
      </seealso>.</p>
  </section>

  <section>
      <marker id="erl_signal_server"/>
      <title>OS Signal Event Handler</title>
      <p>Asynchronous OS signals may be subscribed to via the Kernel applications event manager
          (see <seealso marker="doc/design_principles:des_princ">OTP Design Principles</seealso> and
          <seealso marker="stdlib:gen_event"><c>gen_event(3)</c></seealso>) registered as <c>erl_signal_server</c>.
          A default signal handler is installed which handles the following signals:</p>
          <taglist>
              <tag><c>sigusr1</c></tag>
              <item><p>The default handler will halt Erlang and produce a crashdump
                      with slogan "Received SIGUSR1".
                      This is equivalent to calling <c>erlang:halt("Received SIGUSR1")</c>.
              </p></item>

              <tag><c>sigquit</c></tag>
              <item><p>The default handler will halt Erlang immediately.
                      This is equivalent to calling <c>erlang:halt()</c>.
              </p></item>

              <tag><c>sigterm</c></tag>
              <item><p>The default handler will terminate Erlang normally.
                      This is equivalent to calling <c>init:stop()</c>.
              </p></item>
          </taglist>

          <section>
              <title>Events</title>
              <p>Any event handler added to <c>erl_signal_server</c> must handle the following events.</p>
              <taglist>
                  <tag><c>sighup</c></tag>
                  <item><p>Hangup detected on controlling terminal or death of controlling process</p></item>
                  <tag><c>sigquit</c></tag>
                  <item><p>Quit from keyboard</p></item>
                  <tag><c>sigabrt</c></tag>
                  <item><p>Abort signal from abort</p></item>
                  <tag><c>sigalrm</c></tag>
                  <item><p>Timer signal from alarm</p></item>
                  <tag><c>sigterm</c></tag>
                  <item><p>Termination signal</p></item>
                  <tag><c>sigusr1</c></tag>
                  <item><p>User-defined signal 1</p></item>
                  <tag><c>sigusr2</c></tag>
                  <item><p>User-defined signal 2</p></item>
                  <tag><c>sigchld</c></tag>
                  <item><p>Child process stopped or terminated</p></item>
                  <tag><c>sigstop</c></tag>
                  <item><p>Stop process</p></item>
                  <tag><c>sigtstp</c></tag>
                  <item><p>Stop typed at terminal</p></item>
              </taglist>

              <p>Setting OS signals are described in <seealso marker="os#set_signal/2"><c>os:set_signal/2</c></seealso>.</p>
          </section>
  </section>

  <section>
    <marker id="configuration"/>
    <title>Configuration</title>
    <p>The following configuration parameters are defined for the Kernel
      application. For more information about configuration parameters,
    see file <seealso marker="app"><c>app(4)</c></seealso>.</p>
    <taglist>
      <tag><c>distributed = [Distrib]</c></tag>
      <item>
        <p>Specifies which applications that are distributed and on which
          nodes they are allowed to execute. In this parameter:</p>
        <list type="bulleted">
          <item><c>Distrib = {App,Nodes} | {App,Time,Nodes}</c></item>
          <item><c>App = atom()</c></item>
          <item><c>Time = integer()>0</c></item>
          <item><c>Nodes = [node() | {node(),...,node()}]</c></item>
        </list>
        <p>The parameter is described in
	  <seealso marker="application#load/2"><c>application:load/2</c></seealso>.</p>
      </item>
      <tag><c>dist_auto_connect = Value</c></tag>
      <item>
        <p>Specifies when nodes are automatically connected. If
          this parameter is not specified, a node is always
          automatically connected, for example, when a message is to be sent to
          that node. <c>Value</c> is one of:</p>
        <taglist>
          <tag><c>never</c></tag>
          <item><p>Connections are never automatically established, they
           must be explicitly connected. See
	   <seealso marker="net_kernel"><c>net_kernel(3)</c></seealso>.</p></item>
          <tag><c>once</c></tag>
          <item><p>Connections are established automatically, but only
           once per node. If a node goes down, it must thereafter be
           explicitly connected. See
	   <seealso marker="net_kernel"><c>net_kernel(3)</c></seealso>.</p></item>
        </taglist>
      </item>
      <tag><c>permissions = [Perm]</c></tag>
      <item>
        <p>Specifies the default permission for applications when they
          are started. In this parameter:</p>
        <list type="bulleted">
          <item><c>Perm = {ApplName,Bool}</c></item>
          <item><c>ApplName = atom()</c></item>
          <item><c>Bool = boolean()</c></item>
        </list>
        <p>Permissions are described in
	  <seealso marker="application#permit/2"><c>application:permit/2</c></seealso>.</p>
      </item>
      <tag><c>logger_dest = Value</c></tag>
      <item>
        <p><c>Value</c> is one of:</p>
        <taglist>
          <tag><c>tty</c></tag>
          <item><p>Installs the standard handler, <seealso marker="logger_std_h">
	   <c>logger_std_h(3)</c></seealso>, with <c>type</c> set
           to <c>standard_io</c>. This is the default
           option.</p></item>
          <tag><c>{file, FileName}</c></tag>
          <item><p>Installs the standard handler, <seealso marker="logger_std_h">
	   <c>logger_std_h(3)</c></seealso>, with <c>type</c> set
           to <c>{file, FileName}</c>, where <c>FileName</c>
           is a string. The file is opened with encoding UTF-8.</p></item>
          <tag><c>{disk_log, FileName}</c></tag>
          <item><p>Installs the disk_log handler, <seealso marker="logger_disk_log_h">
	   <c>logger_disk_log_h(3)</c></seealso>, with <c>file</c> set
           to <c>FileName</c> (a string), and possibly other disk_log
           parameters set by the environment variables
	   <c>logger_disk_log_type</c>, <c>logger_disk_log_maxfiles</c> and
	   <c>logger_disk_log_maxbytes</c>,
           see <seealso marker="#disk_log_vars">below</seealso>. The
           file is opened with encoding UTF-8.</p></item>
          <tag><c>false</c></tag>
          <item>
            <p>No standard handler is installed, but
              the initial, primitive handler is kept, printing
              raw event messages to <c>tty</c>.</p>
          </item>
          <tag><c>silent</c></tag>
          <item>
            <p>No standard handler is started, and the initial,
              primitive handler is removed.</p>
          </item>
        </taglist>
      </item>
      <tag><c>logger_level = Level</c></tag>
      <item>
        <p><c>Value = emergency | alert | critical | error | warning |
	    notice | info | debug</c></p>
	  <p>This parameter specifies which log levels to log. The
	    specified level, and all levels that are more severe, will
	    be logged.</p>
	  <p>This configuration parameter is used both for the global
	    logger level, and for the standard handler started by
	    the Kernel application (see <c>logger_dest</c> variable above).</p>
	  <p>The default value is <c>info</c>.</p>
      </item>
      <tag><marker id="disk_log_vars"/>
	<c>logger_disk_log_type = halt | wrap</c></tag>
      <item/>
      <tag><c>logger_disk_log_maxfiles = integer()</c></tag>
      <item/>
      <tag><c>logger_disk_log_maxbytes = integer()</c></tag>
      <item>
	<p>If <c>logger_dest</c> is set to {disk_log,File}, then these
	  parameters specify the configuration to use when opening the
	  disk log file. They specify the type of disk log, the
	  maximum number of files (if the type is wrap) and the
	  maximum size of each file, respectively.</p>
	<p>The default values are:</p>
	<code>
logger_disk_log_type = wrap
logger_disk_log_maxfiles = 10
logger_disk_log_maxbytes = 1048576</code>
      </item>
      <tag><marker id="logger_sasl_compatible"/>
	<c>logger_sasl_compatible = boolean()</c></tag>
      <item>
	<p>If this parameter is set to true, then the logger handler
	  started by kernel will not log any progress-, crash-, or
	  supervisor reports. If the SASL application is started,
	  these log events will be sent to a second handler instance
	  named <c>sasl_h</c>, according to values of the SASL
	  environment variables <c>sasl_error_logger</c>
	  and <c>sasl_errlog_type</c>, see
	  <seealso marker="sasl:sasl_app#configuration">SASL(6)
	</seealso></p>
	<p>The default value is <c>false</c>.</p>
	<p>See chapter <seealso marker="logger_chapter#compatibility">Backwards
	  compatibility with error_logger</seealso> for more
	  information about handling of the so called SASL reports.</p>
      </item>
      <tag><marker id="logger_log_progress"/>
	<c>logger_log_progress = boolean()</c></tag>
      <item>
	<p>If <c>logger_sasl_compatible = false</c>,
	  then <c>logger_log_progress</c> specifies if progress
	  reports from <c>supervisor</c>
	  and <c>application_controller</c> shall be logged or
	  not.</p>
	<p>If <c>logger_sasl_compatible = true</c>,
	  then <c>logger_log_progress</c> is ignored.</p>
      </item>
      <tag><marker id="logger_format_depth"/>
	<c>logger_format_depth = Depth</c></tag>
      <item>
	<p>Can be used to limit the size of the
	formatted output from the logger handlers.</p>

        <p><c>Depth</c> is a positive integer representing the maximum
        depth to which terms are printed by the logger
        handlers included in OTP. This
        configuration parameter is used by the default formatter,
	<seealso marker="logger_formatter"><c>logger_formatter(3)</c></seealso>,
	unless the formatter's <c>depth</c> parameter is explicitly set.
	(If you have implemented your own formatter, this configuration
	parameter has no effect on that.)</p>

	<p><c>Depth</c> is used as follows: Format strings
	received by the formatter are rewritten.
	The format controls <c>~p</c> and <c>~w</c> are replaced with
	<c>~P</c> and <c>~W</c>, respectively, and <c>Depth</c> is
	used as the depth parameter. For details, see
	<seealso marker="stdlib:io#format/2"><c>io:format/2</c></seealso>
	in STDLIB.</p>

	<note><p>A reasonable starting value for <c>Depth</c> is
	<c>30</c>. We recommend to test crashing various processes in your
	application, examine the logs from the crashes, and then
	increase or decrease the value.</p></note>
      </item>
      <tag><c>logger_max_size = integer() | unlimited</c></tag>
      <item>
	<p>This parameter specifies a hard maximum size limit (number
	  of characters) each log event can have when printed by the
	  default logger formatter. If the resulting string after
	  formatting an event is bigger than this, it will be
	  truncated before printed to the handler's destination.</p>
      </item>
      <tag><c>logger_utc = boolean()</c></tag>
      <item>
	<p>If set to <c>true</c>, the default formatter will display
	  all dates in Universal Coordinated Time.</p>
      </item>
      <tag><c>global_groups = [GroupTuple]</c></tag>
      <item>
        <marker id="global_groups"></marker>
        <p>Defines global groups, see
	  <seealso marker="global_group"><c>global_group(3)</c></seealso>.
	In this parameter:</p>
        <list type="bulleted">
          <item><p><c>GroupTuple = {GroupName, [Node]} | {GroupName, PublishType, [Node]}</c></p></item>
          <item><p><c>GroupName = atom()</c></p></item>
          <item><p><c>PublishType = normal | hidden</c></p></item>
          <item><p><c>Node = node()</c></p></item>
        </list>
      </item>
      <tag><c>inet_default_connect_options = [{Opt, Val}]</c></tag>
      <item>
        <p>Specifies default options for <c>connect</c> sockets,
          see <seealso marker="inet"><c>inet(3)</c></seealso>.</p>
      </item>
      <tag><c>inet_default_listen_options = [{Opt, Val}]</c></tag>
      <item>
        <p>Specifies default options for <c>listen</c> (and
          <c>accept</c>) sockets, see <seealso marker="inet"><c>inet(3)</c></seealso>.</p>
      </item>
      <tag><c>{inet_dist_use_interface, ip_address()}</c></tag>
      <item>
        <p>If the host of an Erlang node has many network interfaces,
          this parameter specifies which one to listen on. For the type definition
	  of <c>ip_address()</c>,
	  see <seealso marker="inet"><c>inet(3)</c></seealso>.</p>
      </item>
      <tag><c>{inet_dist_listen_min, First}</c> and <c>{inet_dist_listen_max, Last}</c></tag>
      <item>
        <p>Defines the <c>First..Last</c> port range for the listener
          socket of a distributed Erlang node.</p>
      </item>
      <tag><c>{inet_dist_listen_options, Opts}</c></tag>
      <item>
	<marker id="inet_dist_listen_options"></marker>
        <p>Defines a list of extra socket options to be used when opening the
	  listening socket for a distributed Erlang node.
	  See <seealso marker="gen_tcp#listen/2"><c>gen_tcp:listen/2</c></seealso>.</p>
      </item>
      <tag><c>{inet_dist_connect_options, Opts}</c></tag>
      <item>
	<marker id="inet_dist_connect_options"></marker>
        <p>Defines a list of extra socket options to be used when connecting to
	  other distributed Erlang nodes.
	  See <seealso marker="gen_tcp#connect/4"><c>gen_tcp:connect/4</c></seealso>.</p>
      </item>
      <tag><c>inet_parse_error_log = silent</c></tag>
      <item>
        <p>If set, no
          <c>error_logger</c> messages are generated when erroneous
          lines are found and skipped in the various Inet configuration
          files.</p>
      </item>
      <tag><c>inetrc = Filename</c></tag>
      <item>
        <p>The name (string) of an Inet user configuration file. For details,
	see section
	<seealso marker="erts:inet_cfg"><c>Inet Configuration</c></seealso>
	in the ERTS User's Guide.</p>
      </item>
      <tag><c>net_setuptime = SetupTime</c></tag>
      <item>
        <marker id="net_setuptime"></marker>
        <p><c>SetupTime</c> must be a positive integer or floating point
          number, and is interpreted as the maximum allowed time
          for each network operation during connection setup to another
          Erlang node. The maximum allowed value is <c>120</c>. If higher values
          are specified, <c>120</c> is used. Default is 7 seconds if the variable
          is not specified, or if the value is incorrect (for example, not a number).</p>
        <p>Notice that this value does not limit the total connection
          setup time, but rather each individual network operation during
          the connection setup and handshake.</p>
      </item>
      <tag><c>net_ticktime = TickTime</c></tag>
      <item>
        <marker id="net_ticktime"></marker>
        <p>Specifies the <c>net_kernel</c> tick time. <c>TickTime</c>
          is specified in seconds. Once every <c>TickTime/4</c> second, all
          connected nodes are ticked (if anything else is written
          to a node). If nothing is received from another node
          within the last four tick times, that node is considered
          to be down. This ensures that nodes that are not responding,
          for reasons such as hardware errors, are considered to be
          down.</p>
        <p>The time <c>T</c>, in which a node that is not responding is
          detected, is calculated as <c><![CDATA[MinT < T < MaxT]]></c>, where:</p>
        <code type="none">
MinT = TickTime - TickTime / 4
MaxT = TickTime + TickTime / 4</code>
        <p><c>TickTime</c> defaults to <c>60</c> (seconds). Thus,
          <c><![CDATA[45 < T < 75]]></c> seconds.</p>
        <p>Notice that <em>all</em> communicating nodes are to have the <em>same</em>
          <c>TickTime</c> value specified.</p>
        <p>Normally, a terminating node is detected immediately.</p>
      </item>
      <tag><c>shutdown_timeout = integer() | infinity</c></tag>
      <item>
        <p>Specifies the time <c>application_controller</c> waits
          for an application to terminate during node shutdown. If the
          timer expires, <c>application_controller</c> brutally
          kills <c>application_master</c> of the hanging
          application. If this parameter is undefined, it defaults
          to <c>infinity</c>.</p>
      </item>
      <tag><c>sync_nodes_mandatory = [NodeName]</c></tag>
      <item>
        <p>Specifies which other nodes that <em>must</em> be alive
          for this node to start properly. If some node in the list
          does not start within the specified time, this node does not
          start either. If this parameter is undefined, it defaults to
          <c>[]</c>.</p>
      </item>
      <tag><c>sync_nodes_optional = [NodeName]</c></tag>
      <item>
        <p>Specifies which other nodes that <em>can</em> be alive
          for this node to start properly. If some node in this list
          does not start within the specified time, this node starts
          anyway. If this parameter is undefined, it defaults to
          the empty list.</p>
      </item>
      <tag><c>sync_nodes_timeout = integer() | infinity</c></tag>
      <item>
        <p>Specifies the time (in milliseconds) that this node
          waits for the mandatory and optional nodes to start. If
          this parameter is undefined, no node synchronization is
          performed. This option ensures that <c>global</c> is
          synchronized.</p>
      </item>
      <tag><c>start_dist_ac = true | false</c></tag>
      <item>
        <p>Starts the <c>dist_ac</c> server if the parameter is
          <c>true</c>. This parameter is to be set to <c>true</c> for
          systems using distributed applications.</p>
        <p>Defaults to <c>false</c>.  If this parameter is
          undefined, the server is started if parameter
          <c>distributed</c> is set.</p>
      </item>
      <tag><c>start_boot_server = true | false</c></tag>
      <item>
        <p>Starts the <c>boot_server</c> if the parameter is <c>true</c>
          (see <seealso marker="erl_boot_server"><c>erl_boot_server(3)</c></seealso>).
	  This parameter is to be set to <c>true</c> in an embedded system
	  using this service.</p>
        <p>Defaults to <c>false</c>.</p>
      </item>
      <tag><c>boot_server_slaves = [SlaveIP]</c></tag>
      <item>
        <p>If configuration parameter <c>start_boot_server</c> is
          <c>true</c>, this parameter can be used to initialize
          <c>boot_server</c> with a list of slave IP addresses:</p>
	<p>
          <c>SlaveIP = string() | atom | {integer(),integer(),integer(),integer()}</c>,</p>
        <p>where <c><![CDATA[0 <= integer() <=255]]></c>.</p>
        <p>Examples of <c>SlaveIP</c> in atom, string, and tuple form:</p>
	<p><c>'150.236.16.70', "150,236,16,70", {150,236,16,70}</c>.</p>
        <p>Defaults to <c>[]</c>.</p>
      </item>
      <tag><c>start_disk_log = true | false</c></tag>
      <item>
        <p>Starts the <c>disk_log_server</c> if the parameter is
          <c>true</c> (see <seealso marker="disk_log"><c>disk_log(3)</c></seealso>).
	  This parameter is to be set to <c>true</c> in an embedded system
	  using this service.</p>
        <p>Defaults to <c>false</c>.</p>
      </item>
      <tag><c>start_pg2 = true | false</c></tag>
      <item>
        <marker id="start_pg2"></marker>
        <p>Starts the <c>pg2</c> server (see
	  <seealso marker="pg2"><c>pg2(3)</c></seealso>) if
          the parameter is <c>true</c>. This parameter is to be set to
          <c>true</c> in an embedded system that uses this service.</p>
        <p>Defaults to <c>false</c>.</p>
      </item>
      <tag><c>start_timer = true | false</c></tag>
      <item>
        <p>Starts the <c>timer_server</c> if the parameter is
          <c>true</c> (see <seealso marker="stdlib:timer"><c>timer(3)</c></seealso>).
	  This parameter is to be set to <c>true</c> in an embedded system
	  using this service.</p>
        <p>Defaults to <c>false</c>.</p>
      </item>
      <tag><c>shell_history = enabled | disabled </c></tag>
      <item>
        <p>Specifies whether shell history should be logged to disk
           between usages of <c>erl</c>.</p>
      </item>
      <tag><c>shell_history_drop = [string()]</c></tag>
      <item>
        <p>Specific log lines that should not be persisted. For
           example <c>["q().", "init:stop()."]</c> will allow to
           ignore commands that shut the node down. Defaults to
           <c>[]</c>.</p>
      </item>
      <tag><c>shell_history_file_bytes = integer()</c></tag>
      <item>
        <p>how many bytes the shell should remember. By default, the
           value is set to 512kb, and the minimal value is 50kb.</p>
      </item>
      <tag><c>shell_history_path = string()</c></tag>
      <item>
        <p>Specifies where the shell history files will be stored.
           defaults to the user's cache directory as returned by
           <c>filename:basedir(user_cache, "erlang-history")</c>.</p>
      </item>
      <tag><c>shutdown_func = {Mod, Func}</c></tag>
      <item>
        <p>Where:</p>
        <list type="bulleted">
          <item><c>Mod = atom()</c></item>
          <item><c>Func = atom()</c></item>
        </list>
        <p>Sets a function that <c>application_controller</c> calls
          when it starts to terminate. The function is called as
          <c>Mod:Func(Reason)</c>, where <c>Reason</c> is the terminate
          reason for <c>application_controller</c>, and it must
          return as soon as possible for <c>application_controller</c>
          to terminate properly.</p>
      </item>
      <tag><c>source_search_rules = [DirRule] | [SuffixRule] </c></tag>
      <item>
	<marker id="source_search_rules"></marker>
        <p>Where:</p>
        <list type="bulleted">
          <item><c>DirRule = {ObjDirSuffix,SrcDirSuffix}</c></item>
          <item><c>SuffixRule = {ObjSuffix,SrcSuffix,[DirRule]}</c></item>
          <item><c>ObjDirSuffix = string()</c></item>
          <item><c>SrcDirSuffix = string()</c></item>
          <item><c>ObjSuffix = string()</c></item>
          <item><c>SrcSuffix = string()</c></item>
        </list>
        <p>Specifies a list of rules for use by
	  <seealso marker="stdlib:filelib#find_file/2">
	  <c>filelib:find_file/2</c></seealso>
	  <seealso marker="stdlib:filelib#find_source/2">
	  <c>filelib:find_source/2</c></seealso>
          If this is set to some other value
          than the empty list, it replaces the default rules. Rules can be
          simple pairs of directory suffixes, such as <c>{"ebin",
          "src"}</c>, which are used by <c>filelib:find_file/2</c>, or
          triples specifying separate directory suffix rules depending on
          file name extensions, for example <c>[{".beam", ".erl", [{"ebin",
          "src"}]}</c>, which are used by <c>filelib:find_source/2</c>. Both
          kinds of rules can be mixed in the list.</p>
	  <p>The interpretation of <c>ObjDirSuffix</c> and <c>SrcDirSuffix</c>
	  is as follows: if the end of the directory name where an
	  object is located matches <c>ObjDirSuffix</c>, then the
	  name created by replacing <c>ObjDirSuffix</c> with
	  <c>SrcDirSuffix</c> is expanded by calling
	  <seealso marker="stdlib:filelib#wildcard/1">
	  <c>filelib:wildcard/1</c></seealso>, and the first regular
	  file found among the matches is the source file.
	</p>

      </item>
    </taglist>
  </section>

  <section>
    <title>Deprecated Configuration Parameters</title>
    <p>In OTP-21, a new API for logging was added to Erlang/OTP. The
      old <c>error_logger</c> event manager, and event handlers
      running on this manager, will still work, but they are not used
      by default.</p>
    <p>The following application environment variables can still be
      set, but they will only be used if the corresponding new logger
      variables are not set.</p>
    <taglist>
      <tag><c>error_logger</c></tag>
      <item>Replaced by <c>logger_dest</c></item>
      <tag><c>error_logger_format_depth</c></tag>
      <item>Replaced by <c>logger_format_depth</c></item>
    </taglist>
    <p>See <seealso marker="logger_chapter#compatibility">Backwards
	compatibility with error_logger</seealso> for more
      information.</p>
  </section>

  <section>
    <title>See Also</title>
    <p><seealso marker="app"><c>app(4)</c></seealso>,
      <seealso marker="application"><c>application(3)</c></seealso>,
      <seealso marker="code"><c>code(3)</c></seealso>,
      <seealso marker="disk_log"><c>disk_log(3)</c></seealso>,
      <seealso marker="erl_boot_server"><c>erl_boot_server(3)</c></seealso>,
      <seealso marker="erl_ddll"><c>erl_ddll(3)</c></seealso>,
      <seealso marker="error_logger"><c>error_logger(3)</c></seealso>,
      <seealso marker="file"><c>file(3)</c></seealso>,
      <seealso marker="global"><c>global(3)</c></seealso>,
      <seealso marker="global_group"><c>global_group(3)</c></seealso>,
      <seealso marker="heart"><c>heart(3)</c></seealso>,
      <seealso marker="inet"><c>inet(3)</c></seealso>,
      <seealso marker="net_kernel"><c>net_kernel(3)</c></seealso>,
      <seealso marker="os"><c>os(3)</c></seealso>,
      <seealso marker="pg2"><c>pg2(3)</c></seealso>,
      <seealso marker="rpc"><c>rpc(3)</c></seealso>,
      <seealso marker="seq_trace"><c>seq_trace(3)</c></seealso>,
      <seealso marker="user"><c>user(3)</c></seealso>,
      <seealso marker="stdlib:timer"><c>timer(3)</c></seealso></p>
  </section>
</appref>