comparison xml/en/docs/ngx_core_module.xml @ 953:aded7086e84f

Commercial version documentation.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 01 Aug 2013 16:31:02 +0400
parents 3860b37d56c0
children 6d9d4bb571a9
comparison
equal deleted inserted replaced
952:417dc982362e 953:aded7086e84f
8 <!DOCTYPE module SYSTEM "../../../dtd/module.dtd"> 8 <!DOCTYPE module SYSTEM "../../../dtd/module.dtd">
9 9
10 <module name="Core functionality" 10 <module name="Core functionality"
11 link="/en/docs/ngx_core_module.html" 11 link="/en/docs/ngx_core_module.html"
12 lang="en" 12 lang="en"
13 rev="8"> 13 rev="9">
14 14
15 <section id="example" name="Example Configuration"> 15 <section id="example" name="Example Configuration">
16 16
17 <para> 17 <para>
18 <example> 18 <example>
142 </directive> 142 </directive>
143 143
144 144
145 <directive name="error_log"> 145 <directive name="error_log">
146 <syntax> 146 <syntax>
147 <value>file</value> | <literal>stderr</literal> 147 <value>file</value> | <literal>stderr</literal> |
148 <literal>syslog:</literal><literal>server</literal>=<value>address</value>[,<value>parameter</value>=<value>value</value>]
148 [<literal>debug</literal> | 149 [<literal>debug</literal> |
149 <literal>info</literal> | 150 <literal>info</literal> |
150 <literal>notice</literal> | 151 <literal>notice</literal> |
151 <literal>warn</literal> | 152 <literal>warn</literal> |
152 <literal>error</literal> | 153 <literal>error</literal> |
168 The first parameter defines a file that will store the log. 169 The first parameter defines a file that will store the log.
169 <!-- 170 <!--
170 If filename is not absolute, it is prefixed with the prefix path. 171 If filename is not absolute, it is prefixed with the prefix path.
171 --> 172 -->
172 The special value <literal>stderr</literal> selects the standard error file. 173 The special value <literal>stderr</literal> selects the standard error file.
174 Logging to syslog can be configured by specifying
175 the “<literal>syslog:</literal>” prefix.
173 </para> 176 </para>
174 177
175 <para> 178 <para>
176 The second parameter determines the level of logging. 179 The second parameter determines the level of logging.
177 Log levels above are listed in the order of increasing severity. 180 Log levels above are listed in the order of increasing severity.
184 If this parameter is omitted then <literal>error</literal> is used. 187 If this parameter is omitted then <literal>error</literal> is used.
185 <note> 188 <note>
186 For <literal>debug</literal> logging to work, nginx needs to 189 For <literal>debug</literal> logging to work, nginx needs to
187 be built with <literal>--with-debug</literal>, 190 be built with <literal>--with-debug</literal>,
188 see “<link doc="debugging_log.xml"/>”. 191 see “<link doc="debugging_log.xml"/>”.
192 </note>
193 </para>
194
195 <para>
196 The following parameters configure logging to syslog:
197 <list type="tag">
198
199 <tag-name><literal>server=</literal><value>address</value></tag-name>
200 <tag-desc>
201 Defines an address of a syslog server.
202 An address can be specified as a domain name or IP address,
203 and an optional port, or as a UNIX-domain socket path
204 specified after the “<literal>unix:</literal>” prefix.
205 If port is not specified, the port 514 is used.
206 If a domain name resolves to several IP addresses, the first resolved
207 address is used.
208 </tag-desc>
209
210 <tag-name><literal>facility=</literal><value>string</value></tag-name>
211 <tag-desc>
212 Sets facility of syslog messages, as defined in
213 <link url="http://tools.ietf.org/html/rfc3164#section-4.1.1">RFC 3164</link>.
214 Facility can be one of “<literal>kern</literal>”, “<literal>user</literal>”,
215 “<literal>mail</literal>”, “<literal>daemon</literal>”,
216 “<literal>auth</literal>”, “<literal>intern</literal>”,
217 “<literal>lpr</literal>”, “<literal>news</literal>”, “<literal>uucp</literal>”,
218 “<literal>clock</literal>”, “<literal>authpriv</literal>”,
219 “<literal>ftp</literal>”, “<literal>ntp</literal>”, “<literal>audit</literal>”,
220 “<literal>alert</literal>”, “<literal>cron</literal>”,
221 “<literal>local0</literal>”..“<literal>local7</literal>”.
222 Default is “<literal>local7</literal>”.
223 </tag-desc>
224
225 <tag-name><literal>tag=</literal><value>string</value></tag-name>
226 <tag-desc>
227 Sets tag of syslog messages.
228 Default is “<literal>nginx</literal>”.
229 </tag-desc>
230
231 <!--
232 <tag-name><literal>bare=</literal><literal>on</literal> |
233 <literal>off</literal></tag-name>
234 <tag-desc>
235 If enabled, messages are sent without syslog headers.
236 Default is <literal>off</literal>.
237 </tag-desc>
238 -->
239
240 </list>
241 Example syslog configuration:
242 <example>
243 error_log syslog:server=192.168.1.1 debug;
244 error_log syslog:server=unix:/var/log/nginx.sock;
245 error_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx error;
246 </example>
247 </para>
248
249 <para>
250 <note>
251 Logging to syslog is available as part of our <commercial_version/> only.
189 </note> 252 </note>
190 </para> 253 </para>
191 254
192 </directive> 255 </directive>
193 256