aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/doc/src/sasl_app.xml
blob: be275879ee05e09b7dbb62b3908260557e11388b (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
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">

<appref>
  <header>
    <copyright>
      <year>1996</year><year>2016</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>sasl</title>
    <prepared></prepared>
    <docno></docno>
    <date></date>
    <rev></rev>
    </header>
    <app>sasl</app>
    <appsummary>The SASL application</appsummary>
    <description>
    <p>The SASL application provides the following services:</p>
    <list type="bulleted">
      <item><c>alarm_handler</c></item>
      <item><c>release_handler</c></item>
      <item><c>systools</c></item>
    </list>
    <note>
       <p>The SASL application in OTP has nothing to do with
          "Simple Authentication and Security Layer" (RFC 4422).</p>
    </note>
  </description>

  <section>
    <title>Configuration</title>
    <p>The following configuration parameters are defined for the SASL
      application. For more information about configuration parameters, see
      <seealso marker="kernel:app"><c>app(4)</c></seealso> in Kernel.</p>
    <p>All configuration parameters are optional.</p>
    <taglist>
      <tag><c><![CDATA[start_prg = string() ]]></c></tag>
      <item>
        <p>Specifies the program to be used when restarting the system
          during release installation. Default is
          <c>$OTP_ROOT/bin/start</c>.</p>
      </item>
      <tag><c><![CDATA[masters = [atom()] ]]></c></tag>
      <item>
        <p>Specifies the nodes used by this node to read/write release
          information. This parameter is ignored if parameter
          <c>client_directory</c> is not set.</p>
      </item>
      <tag><c><![CDATA[client_directory = string() ]]></c></tag>
      <item>
        <p>This parameter specifies the client directory at the master
          nodes. For details, see
          <seealso marker="doc/design_principles:release_handling">Release Handling</seealso>
          in <em>OTP Design Principles</em>. This parameter is
          ignored if parameter <c>masters</c> is not set.</p>
      </item>
      <tag><c><![CDATA[static_emulator = true | false ]]></c></tag>
      <item>
        <p>Indicates if the Erlang emulator is statically installed. A
          node with a static emulator cannot switch dynamically to a
          new emulator, as the executable files are written into memory
          statically. This parameter is ignored if parameters <c>masters</c>
          and <c>client_directory</c> are not set.</p>
      </item>
      <tag><c><![CDATA[releases_dir = string() ]]></c></tag>
      <item>
        <p>Indicates where the <c>releases</c> directory is located.
          The release handler writes all its files to this directory.
          If this parameter is not set, the OS environment parameter
          <c>RELDIR</c> is used. By default, this is
          <c>$OTP_ROOT/releases</c>.</p>
      </item>
    </taglist>
  </section>

  <section>
    <marker id="deprecated_error_logger_config"/>
    <title>Deprecated Error Logger Event Handlers and Configuration</title>
    <p>In Erlang/OTP 21.0, a new API for logging was added. The
      old <c>error_logger</c> event manager, and event handlers
      running on this manager, still work, but they are not used
      by default.</p>
    <p>The error logger event handlers <c>sasl_report_tty_h</c>
      and <c>sasl_report_file_h</c>, were earlier used for printing
      the so called SASL reports, i.e. <em>supervisor
      reports</em>, <em>crash reports</em>, and <em>progress
      reports</em>. 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 be
      added by setting the Kernel configuration
      parameter <seealso marker="kernel:kernel_app#logger_progress_reports">
      <c>logger_progress_reports</c></seealso> to <c>log</c>.</p>
    <p>If the old error logger event handlers are still desired, they
      must be added by
      calling <c>error_logger:add_report_handler/1,2</c>.</p>
    <taglist>
      <tag><c>sasl_report_tty_h</c></tag>
      <item>
        <p>Formats and writes <em>supervisor reports</em>, <em>crash
        reports</em>, and <em>progress reports</em> to <c>stdio</c>.
        This error logger event handler uses
	<seealso marker="kernel:kernel_app#deprecated-configuration-parameters"><c>error_logger_format_depth</c></seealso>
	in the Kernel application to limit how much detail is printed
	in crash and supervisor reports.</p>
      </item>
      <tag><c>sasl_report_file_h</c></tag>
      <item>
        <p>Formats and writes <em>supervisor reports</em>, <em>crash
        report</em>, and <em>progress report</em> to a single file.
        This error logger event handler uses
	<seealso marker="kernel:kernel_app#deprecated-configuration-parameters"><c>error_logger_format_depth</c></seealso>
	in the Kernel application to limit the details printed in
	crash and supervisor reports.</p>
      </item>
    </taglist>
    <p>A similar behaviour, but still using the new logger API, can be
      obtained by setting the Kernel application environment
      variable <seealso marker="kernel:kernel_app#logger_sasl_compatible"><c>logger_sasl_compatible=true</c></seealso>. This will add a
      second instance of the standard logger handler
      named <c>sasl</c>, which will only print the SASL reports. No
      SASL reports will then be printed by the Kernel logger
      handler.</p>
    <p>The <c>sasl</c> handler will be configured according to the
      values of the following SASL application environment
      variables.</p>
    <taglist>
      <tag><c><![CDATA[sasl_error_logger = Value ]]></c></tag>
      <item>
        <p><c>Value</c> is one of the following:</p>
        <taglist>
          <tag><c>tty</c></tag>
          <item><p>Installs <c>sasl_report_tty_h</c> in the error logger.
            This is the default option.</p></item>
          <tag><c>{file,FileName}</c></tag>
          <item><p>Installs <c>sasl_report_file_h</c> in the error logger.
            All reports go to file <c>FileName</c>, which is a
            string. The file is opened in <c>write</c> mode with encoding
	    <c>utf8</c>.</p></item>
          <tag><c>{file,FileName,Modes}</c></tag>
          <item><p>Same as <c>{file,FileName}</c>, except that <c>Modes</c>
            allows you to specify the modes used for opening the <c>FileName</c>
            given to the <seealso marker="kernel:file#open/2">file:open/2</seealso>
            call. By default, the file is opened in <c>write</c> mode
            with encoding <c>utf8</c>. Use <c>[append]</c> to have
            the <c>FileName</c> open in append mode. A different
            encoding can also be specified.
            <c>FileName</c> is a string.</p></item>
          <tag><c>false</c></tag>
          <item><p>No SASL error logger handler is installed.</p></item>
        </taglist>
      </item>
      <tag><c><![CDATA[errlog_type = error | progress | all ]]></c></tag>
      <item>
        <p>Restricts the error logging performed by the specified
          <c>sasl_error_logger</c> to error reports or progress reports,
          or both. Default is <c>all</c>.</p>
      </item>
      <tag><marker id="utc_log"/><c><![CDATA[utc_log = true | false ]]></c></tag>
      <item>
        <p>If set to <c>true</c>, all dates in textual log outputs are
          displayed in Universal Coordinated Time with the string
          <c>UTC</c> appended.</p>
      </item>
    </taglist>

    <p>The error logger event handler <c>log_mf_h</c> can also still
      be used. This event handler writes <em>all</em> events sent to
      the error logger to disk. Multiple files and log rotation are
      used. For efficiency reasons, each event is written as a
      binary. For more information about this handler,
      see <seealso marker="stdlib:log_mf_h">the STDLIB Reference
      Manual</seealso>.</p>
    <p>To activate this event handler, three SASL configuration
      parameters must be
      set:</p>
    <taglist>
      <tag><c><![CDATA[error_logger_mf_dir = string() | false ]]></c></tag>
      <item>
        <p>Specifies in which directory <c>log_mf_h</c> is to store
          its files. If this parameter is undefined or <c>false</c>,
          the <c>log_mf_h</c> handler is not installed.</p>
      </item>
      <tag><c><![CDATA[error_logger_mf_maxbytes = integer() ]]></c></tag>
      <item>
        <p>Specifies the maximum size of each individual file written
          by <c>log_mf_h</c>. If this parameter is undefined,
          the <c>log_mf_h</c> handler is not installed.</p>
      </item>
      <tag><c><![CDATA[error_logger_mf_maxfiles = 0<integer()<256 ]]></c></tag>
      <item>
        <p>Specifies the number of files used by <c>log_mf_h</c>. If
          this parameter is undefined, the <c>log_mf_h</c> handler is
          not installed.</p>
      </item>
    </taglist>
    <p>The new <seealso marker="kernel:logger_disk_log_h">
	<c>logger_disk_log_h</c></seealso> might be an alternative
      to <c>log_mf_h</c> if log rotation is desired. This does,
      however, write the log events in clear text and not as binaries.</p>

  </section>

  <section>
    <title>See Also</title>
    <p><seealso marker="alarm_handler"><c>alarm_handler(3)</c></seealso>,
      <seealso marker="kernel:error_logger"><c>error_logger(3)</c></seealso>,
      <seealso marker="kernel:logger"><c>logger(3)</c></seealso>,
      <seealso marker="stdlib:log_mf_h"><c>log_mf_h(3)</c></seealso>,
      <seealso marker="rb"><c>rb(3)</c></seealso>,
      <seealso marker="release_handler"><c>release_handler(3)</c></seealso>,
      <seealso marker="systools"><c>systools(3)</c></seealso></p>
  </section>
</appref>