comparison xml/en/docs/ngx_core_module.xml @ 1285:4e89518a5999

Moved syslog configuration details into the separate documents.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 08 Sep 2014 17:21:16 +0400
parents aab8a1667171
children 2333e08e277d
comparison
equal deleted inserted replaced
1284:d3548b46b87f 1285:4e89518a5999
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="10"> 13 rev="11">
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>
169 The first parameter defines a file that will store the log. 169 The first parameter defines a file that will store the log.
170 <!-- 170 <!--
171 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.
172 --> 172 -->
173 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 174 Logging to <link doc="syslog.xml">syslog</link> can be configured by specifying
175 the “<literal>syslog:</literal>” prefix. 175 the “<literal>syslog:</literal>” prefix.
176 </para> 176 </para>
177 177
178 <para> 178 <para>
179 The second parameter determines the level of logging. 179 The second parameter determines the level of logging.
187 If this parameter is omitted then <literal>error</literal> is used. 187 If this parameter is omitted then <literal>error</literal> is used.
188 <note> 188 <note>
189 For <literal>debug</literal> logging to work, nginx needs to 189 For <literal>debug</literal> logging to work, nginx needs to
190 be built with <literal>--with-debug</literal>, 190 be built with <literal>--with-debug</literal>,
191 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 since version 1.7.1.
252 As part of our
253 <commercial_version>commercial subscription</commercial_version>
254 logging to syslog is available since version 1.5.3.
255 </note> 192 </note>
256 </para> 193 </para>
257 194
258 </directive> 195 </directive>
259 196