=encoding utf-8 =head1 Name syslog - Logging to syslog =head1 The L and L directives support logging to syslog. The following parameters configure logging to syslog: =over =item CI> Defines the address of a syslog server. The address can be specified as a domain name or IP address, with an optional port, or as a UNIX-domain socket path specified after the “C” prefix. If port is not specified, the UDP port 514 is used. If a domain name resolves to several IP addresses, the first resolved address is used. =item CI> Sets facility of syslog messages, as defined in L. Facility can be one of “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”, “C”..“C”. Default is “C”. =item CI> Sets severity of syslog messages for L, as defined in L. Possible values are the same as for the second parameter (level) of the L directive. Default is “C”. B Severity of error messages is determined by nginx, thus the parameter is ignored in the C directive. =item CI> Sets the tag of syslog messages. Default is “C”. =item C Disables adding the “hostname” field into the syslog message header (1.9.7). =back Example syslog configuration: error_log syslog:server=192.168.1.1 debug; access_log syslog:server=unix:/var/log/nginx.sock,nohostname; access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined; B Logging to syslog is available since version 1.7.1. As part of our commercial subscription logging to syslog is available since version 1.5.3.