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