Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_log_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 | 080b36ad8d76 |
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="Module ngx_http_log_module" | 10 <module name="Module ngx_http_log_module" |
11 link="/en/docs/http/ngx_http_log_module.html" | 11 link="/en/docs/http/ngx_http_log_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="13"> | 13 rev="14"> |
14 | 14 |
15 <section id="summary"> | 15 <section id="summary"> |
16 | 16 |
17 <para> | 17 <para> |
18 The <literal>ngx_http_log_module</literal> module writes request logs | 18 The <literal>ngx_http_log_module</literal> module writes request logs |
73 <context>limit_except</context> | 73 <context>limit_except</context> |
74 | 74 |
75 <para> | 75 <para> |
76 Sets the path, format, and configuration for a buffered log write. | 76 Sets the path, format, and configuration for a buffered log write. |
77 Several logs can be specified on the same level. | 77 Several logs can be specified on the same level. |
78 Logging to syslog can be configured by specifying | 78 Logging to <link doc="../syslog.xml">syslog</link> |
79 can be configured by specifying | |
79 the “<literal>syslog:</literal>” prefix in the first parameter. | 80 the “<literal>syslog:</literal>” prefix in the first parameter. |
80 The special value <literal>off</literal> cancels all | 81 The special value <literal>off</literal> cancels all |
81 <literal>access_log</literal> directives on the current level. | 82 <literal>access_log</literal> directives on the current level. |
82 If the format is not specified then the predefined | 83 If the format is not specified then the predefined |
83 “<literal>combined</literal>” format is used. | 84 “<literal>combined</literal>” format is used. |
193 default 1; | 194 default 1; |
194 } | 195 } |
195 | 196 |
196 access_log /path/to/access.log combined if=$loggable; | 197 access_log /path/to/access.log combined if=$loggable; |
197 </example> | 198 </example> |
198 </para> | |
199 | |
200 <para> | |
201 The following parameters configure logging to syslog: | |
202 <list type="tag"> | |
203 | |
204 <tag-name><literal>server=</literal><value>address</value></tag-name> | |
205 <tag-desc> | |
206 Defines the address of a syslog server. | |
207 The address can be specified as a domain name, IP address, or | |
208 a UNIX-domain socket path (specified after the “<literal>unix:</literal>” | |
209 prefix). | |
210 With a domain name or IP address, the port can be specified. | |
211 If port is not specified, the port 514 is used. | |
212 If a domain name resolves to several IP addresses, the first resolved | |
213 address is used. | |
214 </tag-desc> | |
215 | |
216 <tag-name><literal>facility=</literal><value>string</value></tag-name> | |
217 <tag-desc> | |
218 Sets facility of syslog messages, as defined in | |
219 <link url="http://tools.ietf.org/html/rfc3164#section-4.1.1">RFC 3164</link>. | |
220 Facility can be one of “<literal>kern</literal>”, “<literal>user</literal>”, | |
221 “<literal>mail</literal>”, “<literal>daemon</literal>”, | |
222 “<literal>auth</literal>”, “<literal>intern</literal>”, | |
223 “<literal>lpr</literal>”, “<literal>news</literal>”, “<literal>uucp</literal>”, | |
224 “<literal>clock</literal>”, “<literal>authpriv</literal>”, | |
225 “<literal>ftp</literal>”, “<literal>ntp</literal>”, “<literal>audit</literal>”, | |
226 “<literal>alert</literal>”, “<literal>cron</literal>”, | |
227 “<literal>local0</literal>”..“<literal>local7</literal>”. | |
228 Default is “<literal>local7</literal>”. | |
229 </tag-desc> | |
230 | |
231 <tag-name><literal>severity=</literal><value>string</value></tag-name> | |
232 <tag-desc> | |
233 Sets severity of syslog messages, as defined in | |
234 <link url="http://tools.ietf.org/html/rfc3164#section-4.1.1">RFC 3164</link>. | |
235 Possible values are the same as for the second parameter (level) of the | |
236 <link doc="../ngx_core_module.xml" id="error_log"/> directive. | |
237 Default is “<literal>info</literal>”. | |
238 </tag-desc> | |
239 | |
240 <tag-name><literal>tag=</literal><value>string</value></tag-name> | |
241 <tag-desc> | |
242 Sets the tag of syslog messages. | |
243 Default is “<literal>nginx</literal>”. | |
244 </tag-desc> | |
245 | |
246 <!-- | |
247 <tag-name><literal>bare=</literal><literal>on</literal> | | |
248 <literal>off</literal></tag-name> | |
249 <tag-desc> | |
250 If enabled, messages are sent without syslog headers. | |
251 Default is <literal>off</literal>. | |
252 </tag-desc> | |
253 --> | |
254 | |
255 </list> | |
256 Example syslog configuration: | |
257 <example> | |
258 access_log syslog:server=192.168.1.1; | |
259 access_log syslog:server=unix:/var/log/nginx.sock; | |
260 access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined; | |
261 </example> | |
262 </para> | |
263 | |
264 <para> | |
265 <note> | |
266 Logging to syslog is available since version 1.7.1. | |
267 As part of our | |
268 <commercial_version>commercial subscription</commercial_version> | |
269 logging to syslog is available since version 1.5.3. | |
270 </note> | |
271 </para> | 199 </para> |
272 | 200 |
273 </directive> | 201 </directive> |
274 | 202 |
275 | 203 |