comparison xml/en/docs/http/ngx_http_log_module.xml @ 953:aded7086e84f

Commercial version documentation.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 01 Aug 2013 16:31:02 +0400
parents 2a9e42106d6f
children 488a3f738db0
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="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="9"> 13 rev="10">
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
56 <value>path</value> 56 <value>path</value>
57 <value>format</value> 57 <value>format</value>
58 <literal>gzip[=<value>level</value>]</literal> 58 <literal>gzip[=<value>level</value>]</literal>
59 [<literal>buffer</literal>=<value>size</value>] 59 [<literal>buffer</literal>=<value>size</value>]
60 [<literal>flush</literal>=<value>time</value>]</syntax> 60 [<literal>flush</literal>=<value>time</value>]</syntax>
61 <syntax>
62 <literal>syslog:</literal><literal>server</literal>=<value>address</value>[,<value>parameter</value>=<value>value</value>]
63 [<value>format</value>]</syntax>
61 <syntax><literal>off</literal></syntax> 64 <syntax><literal>off</literal></syntax>
62 <default>logs/access.log combined</default> 65 <default>logs/access.log combined</default>
63 <context>http</context> 66 <context>http</context>
64 <context>server</context> 67 <context>server</context>
65 <context>location</context> 68 <context>location</context>
67 <context>limit_except</context> 70 <context>limit_except</context>
68 71
69 <para> 72 <para>
70 Sets the path, format, and configuration of the buffered log writes. 73 Sets the path, format, and configuration of the buffered log writes.
71 Several logs can be specified on the same level. 74 Several logs can be specified on the same level.
75 Logging to syslog can be configured by specifying
76 the “<literal>syslog:</literal>” prefix in the first parameter.
72 The special value <literal>off</literal> cancels all 77 The special value <literal>off</literal> cancels all
73 <literal>access_log</literal> directives on the current level. 78 <literal>access_log</literal> directives on the current level.
74 If format is not specified then the predefined format 79 If format is not specified then the predefined format
75 “<literal>combined</literal>” is used. 80 “<literal>combined</literal>” is used.
76 </para> 81 </para>
170 ... 175 ...
171 </example> 176 </example>
172 </listitem> 177 </listitem>
173 178
174 </list> 179 </list>
180 </para>
181
182 <para>
183 The following parameters configure logging to syslog:
184 <list type="tag">
185
186 <tag-name><literal>server=</literal><value>address</value></tag-name>
187 <tag-desc>
188 Defines an address of a syslog server.
189 An address can be specified as a domain name or IP address,
190 and an optional port, or as a UNIX-domain socket path
191 specified after the “<literal>unix:</literal>” prefix.
192 If port is not specified, the port 514 is used.
193 If a domain name resolves to several IP addresses, the first resolved
194 address is used.
195 </tag-desc>
196
197 <tag-name><literal>facility=</literal><value>string</value></tag-name>
198 <tag-desc>
199 Sets facility of syslog messages, as defined in
200 <link url="http://tools.ietf.org/html/rfc3164#section-4.1.1">RFC 3164</link>.
201 Facility can be one of “<literal>kern</literal>”, “<literal>user</literal>”,
202 “<literal>mail</literal>”, “<literal>daemon</literal>”,
203 “<literal>auth</literal>”, “<literal>intern</literal>”,
204 “<literal>lpr</literal>”, “<literal>news</literal>”, “<literal>uucp</literal>”,
205 “<literal>clock</literal>”, “<literal>authpriv</literal>”,
206 “<literal>ftp</literal>”, “<literal>ntp</literal>”, “<literal>audit</literal>”,
207 “<literal>alert</literal>”, “<literal>cron</literal>”,
208 “<literal>local0</literal>”..“<literal>local7</literal>”.
209 Default is “<literal>local7</literal>”.
210 </tag-desc>
211
212 <tag-name><literal>severity=</literal><value>string</value></tag-name>
213 <tag-desc>
214 Sets severity of syslog messages, as defined in
215 <link url="http://tools.ietf.org/html/rfc3164#section-4.1.1">RFC 3164</link>.
216 Possible values are the same as for the second parameter (level) of the
217 <link doc="../ngx_core_module.xml" id="error_log"/> directive.
218 Default is “<literal>info</literal>”.
219 </tag-desc>
220
221 <tag-name><literal>tag=</literal><value>string</value></tag-name>
222 <tag-desc>
223 Sets tag of syslog messages.
224 Default is “<literal>nginx</literal>”.
225 </tag-desc>
226
227 <!--
228 <tag-name><literal>bare=</literal><literal>on</literal> |
229 <literal>off</literal></tag-name>
230 <tag-desc>
231 If enabled, messages are sent without syslog headers.
232 Default is <literal>off</literal>.
233 </tag-desc>
234 -->
235
236 </list>
237 Example syslog configuration:
238 <example>
239 access_log syslog:server=192.168.1.1;
240 access_log syslog:server=unix:/var/log/nginx.sock;
241 access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined;
242 </example>
243 </para>
244
245 <para>
246 <note>
247 Logging to syslog is available as part of our <commercial_version/> only.
248 </note>
175 </para> 249 </para>
176 250
177 </directive> 251 </directive>
178 252
179 253