Mercurial > hg > nginx-site
annotate xml/en/docs/syslog.xml @ 1574:39744b9aba1b
Style.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Tue, 22 Sep 2015 19:13:32 +0300 |
parents | 8df0327a1c87 |
children | be92e50c52ac |
rev | line source |
---|---|
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!-- |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 --> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <article name="Logging to syslog" |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 link="/en/docs/syslog.html" |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 lang="en" |
1572
8df0327a1c87
The "severity" syslog parameter is not supported in "error_log".
Vladimir Homutov <vl@nginx.com>
parents:
1466
diff
changeset
|
12 rev="3"> |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 <section> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <para> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 The |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 <link doc="ngx_core_module.xml" id="error_log"/> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 and |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 <link doc="http/ngx_http_log_module.xml" id="access_log"/> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 directives support logging to syslog. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 The following parameters configure logging to syslog: |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 <list type="tag"> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <tag-name><literal>server=</literal><value>address</value></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 Defines the address of a syslog server. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 The address can be specified as a domain name, IP address, or |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 a UNIX-domain socket path (specified after the “<literal>unix:</literal>” |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 prefix). |
1466
564bfa1ef994
Clarify that our syslog logging talks over UDP.
Ruslan Ermilov <ru@nginx.com>
parents:
1285
diff
changeset
|
31 With a domain name or IP address, the UDP port can be specified. |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 If port is not specified, the port 514 is used. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 If a domain name resolves to several IP addresses, the first resolved |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 address is used. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 <tag-name><literal>facility=</literal><value>string</value></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 Sets facility of syslog messages, as defined in |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 <link url="http://tools.ietf.org/html/rfc3164#section-4.1.1">RFC 3164</link>. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 Facility can be one of “<literal>kern</literal>”, “<literal>user</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 “<literal>mail</literal>”, “<literal>daemon</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 “<literal>auth</literal>”, “<literal>intern</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 “<literal>lpr</literal>”, “<literal>news</literal>”, “<literal>uucp</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 “<literal>clock</literal>”, “<literal>authpriv</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 “<literal>ftp</literal>”, “<literal>ntp</literal>”, “<literal>audit</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 “<literal>alert</literal>”, “<literal>cron</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 “<literal>local0</literal>”..“<literal>local7</literal>”. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 Default is “<literal>local7</literal>”. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 <tag-name><literal>severity=</literal><value>string</value></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 Sets severity of syslog messages for |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 <link doc="http/ngx_http_log_module.xml" id="access_log"/>, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 as defined in |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 <link url="http://tools.ietf.org/html/rfc3164#section-4.1.1">RFC 3164</link>. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 Possible values are the same as for the second parameter (level) of the |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 <link doc="ngx_core_module.xml" id="error_log"/> directive. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 Default is “<literal>info</literal>”. |
1574 | 61 <note> |
62 Severity of error messages is determined by nginx, thus the parameter | |
1572
8df0327a1c87
The "severity" syslog parameter is not supported in "error_log".
Vladimir Homutov <vl@nginx.com>
parents:
1466
diff
changeset
|
63 is ignored in the <literal>error_log</literal> directive. |
8df0327a1c87
The "severity" syslog parameter is not supported in "error_log".
Vladimir Homutov <vl@nginx.com>
parents:
1466
diff
changeset
|
64 </note> |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <tag-name><literal>tag=</literal><value>string</value></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 Sets the tag of syslog messages. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 Default is “<literal>nginx</literal>”. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 <!-- |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 <tag-name><literal>bare=</literal><literal>on</literal> | |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 <literal>off</literal></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 If enabled, messages are sent without syslog headers. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 Default is <literal>off</literal>. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 --> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 </list> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 Example syslog configuration: |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 <example> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 error_log syslog:server=192.168.1.1 debug; |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 access_log syslog:server=unix:/var/log/nginx.sock; |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined; |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 </example> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 </para> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 <para> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 <note> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 Logging to syslog is available since version 1.7.1. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 As part of our |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <commercial_version>commercial subscription</commercial_version> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 logging to syslog is available since version 1.5.3. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 </note> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 </para> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 </section> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 </article> |