# HG changeset patch # User Ruslan Ermilov # Date 1410182476 -14400 # Node ID 4e89518a5999f14309377545f5d94d0473005ac4 # Parent d3548b46b87fbec56f6c48200494d72d98991cb7 Moved syslog configuration details into the separate documents. diff --git a/dtd/content.dtd b/dtd/content.dtd --- a/dtd/content.dtd +++ b/dtd/content.dtd @@ -12,7 +12,7 @@ @@ -35,6 +35,7 @@ + @@ -54,9 +55,9 @@ - + @@ -68,6 +69,13 @@ id ID #IMPLIED > + + + + + + rev="14">
@@ -75,7 +75,8 @@ access_log /spool/logs/nginx-access.log Sets the path, format, and configuration for a buffered log write. Several logs can be specified on the same level. -Logging to syslog can be configured by specifying +Logging to syslog +can be configured by specifying the “syslog:” prefix in the first parameter. The special value off cancels all access_log directives on the current level. @@ -197,79 +198,6 @@ access_log /path/to/access.log combined - -The following parameters configure logging to syslog: - - -server=address - -Defines the address of a syslog server. -The address can be specified as a domain name, IP address, or -a UNIX-domain socket path (specified after the “unix:” -prefix). -With a domain name or IP address, the port can be specified. -If port is not specified, the port 514 is used. -If a domain name resolves to several IP addresses, the first resolved -address is used. - - -facility=string - -Sets facility of syslog messages, as defined in -RFC 3164. -Facility can be one of “kern”, “user”, -“mail”, “daemon”, -“auth”, “intern”, -“lpr”, “news”, “uucp”, -“clock”, “authpriv”, -“ftp”, “ntp”, “audit”, -“alert”, “cron”, -“local0”..“local7”. -Default is “local7”. - - -severity=string - -Sets severity of syslog messages, as defined in -RFC 3164. -Possible values are the same as for the second parameter (level) of the - directive. -Default is “info”. - - -tag=string - -Sets the tag of syslog messages. -Default is “nginx”. - - - - - -Example syslog configuration: - -access_log syslog:server=192.168.1.1; -access_log syslog:server=unix:/var/log/nginx.sock; -access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined; - - - - - -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. - - - diff --git a/xml/en/docs/index.xml b/xml/en/docs/index.xml --- a/xml/en/docs/index.xml +++ b/xml/en/docs/index.xml @@ -8,7 +8,7 @@
@@ -46,6 +46,10 @@ + + + + diff --git a/xml/en/docs/ngx_core_module.xml b/xml/en/docs/ngx_core_module.xml --- a/xml/en/docs/ngx_core_module.xml +++ b/xml/en/docs/ngx_core_module.xml @@ -10,7 +10,7 @@ + rev="11">
@@ -171,7 +171,7 @@ The first parameter defines a file that If filename is not absolute, it is prefixed with the prefix path. --> The special value stderr selects the standard error file. -Logging to syslog can be configured by specifying +Logging to syslog can be configured by specifying the “syslog:” prefix. @@ -192,69 +192,6 @@ see “”. - -The following parameters configure logging to syslog: - - -server=address - -Defines an address of a syslog server. -An address can be specified as a domain name or IP address, -and an optional port, or as a UNIX-domain socket path -specified after the “unix:” prefix. -If port is not specified, the port 514 is used. -If a domain name resolves to several IP addresses, the first resolved -address is used. - - -facility=string - -Sets facility of syslog messages, as defined in -RFC 3164. -Facility can be one of “kern”, “user”, -“mail”, “daemon”, -“auth”, “intern”, -“lpr”, “news”, “uucp”, -“clock”, “authpriv”, -“ftp”, “ntp”, “audit”, -“alert”, “cron”, -“local0”..“local7”. -Default is “local7”. - - -tag=string - -Sets tag of syslog messages. -Default is “nginx”. - - - - - -Example syslog configuration: - -error_log syslog:server=192.168.1.1 debug; -error_log syslog:server=unix:/var/log/nginx.sock; -error_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx error; - - - - - -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. - - - diff --git a/xml/en/docs/syslog.xml b/xml/en/docs/syslog.xml new file mode 100644 --- /dev/null +++ b/xml/en/docs/syslog.xml @@ -0,0 +1,99 @@ + + + + + + +
+ +
+ + +The + +and + +directives support logging to syslog. +The following parameters configure logging to syslog: + + +server=address + +Defines the address of a syslog server. +The address can be specified as a domain name, IP address, or +a UNIX-domain socket path (specified after the “unix:” +prefix). +With a domain name or IP address, the port can be specified. +If port is not specified, the port 514 is used. +If a domain name resolves to several IP addresses, the first resolved +address is used. + + +facility=string + +Sets facility of syslog messages, as defined in +RFC 3164. +Facility can be one of “kern”, “user”, +“mail”, “daemon”, +“auth”, “intern”, +“lpr”, “news”, “uucp”, +“clock”, “authpriv”, +“ftp”, “ntp”, “audit”, +“alert”, “cron”, +“local0”..“local7”. +Default is “local7”. + + +severity=string + +Sets severity of syslog messages for +, +as defined in +RFC 3164. +Possible values are the same as for the second parameter (level) of the + directive. +Default is “info”. + + +tag=string + +Sets the tag of syslog messages. +Default is “nginx”. + + + + + +Example syslog configuration: + +error_log syslog:server=192.168.1.1 debug; + +access_log syslog:server=unix:/var/log/nginx.sock; +access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined; + + + + + +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. + + + +
+ +
diff --git a/xml/en/index.xml b/xml/en/index.xml --- a/xml/en/index.xml +++ b/xml/en/index.xml @@ -8,7 +8,7 @@
+ rev="26">
@@ -128,8 +128,9 @@ executable without interruption o Access log formats, buffered -log writing, and -fast log rotation; +log writing, +fast log rotation, and +syslog logging; diff --git a/xml/ru/GNUmakefile b/xml/ru/GNUmakefile --- a/xml/ru/GNUmakefile +++ b/xml/ru/GNUmakefile @@ -8,6 +8,7 @@ DOCS = \ switches \ control \ hash \ + syslog \ dirindex \ varindex \ http/request_processing \ diff --git a/xml/ru/docs/http/ngx_http_log_module.xml b/xml/ru/docs/http/ngx_http_log_module.xml --- a/xml/ru/docs/http/ngx_http_log_module.xml +++ b/xml/ru/docs/http/ngx_http_log_module.xml @@ -10,7 +10,7 @@ + rev="14">
@@ -76,7 +76,8 @@ access_log /spool/logs/nginx-access.log Задаёт путь, формат и настройки буферизованной записи в лог. На одном уровне может использоваться несколько логов. -Запись в syslog настраивается указанием префикса +Запись в syslog +настраивается указанием префикса “syslog:” в первом параметре. Специальное значение off отменяет все директивы access_log для текущего уровня. @@ -195,80 +196,6 @@ access_log /path/to/access.log combined - -Запись в syslog настраивается при помощи следующих параметров: - - -server=адрес - -Задаёт адрес сервера syslog. -Адрес может быть указан в виде доменного имени, IP-адреса или -в виде пути UNIX-сокета (указывается после префикса -“unix:”). -Вместе с именем или адресом может быть указан порт. -Если порт не указан, используется порт 514. -Если доменному имени соответствует несколько IP-адресов, -используется только первый адрес. - - -facility=строка - -Задаёт категорию сообщений syslog в соответствии с -RFC 3164. -В качестве категории может быть указано одно из следующих значений: -“kern”, “user”, -“mail”, “daemon”, -“auth”, “intern”, -“lpr”, “news”, “uucp”, -“clock”, “authpriv”, -“ftp”, “ntp”, “audit”, -“alert”, “cron”, -“local0”..“local7”. -По умолчанию используется “local7”. - - -severity=строка - -Задаёт важность сообщений syslog в соответствии с -RFC 3164. -Возможны те же самые значения, что и у второго параметра (уровень) -директивы . -По умолчанию используется “info”. - - -tag=строка - -Задаёт метку сообщений syslog. -По умолчанию используется “nginx”. - - - - - -Пример конфигурации syslog: - -access_log syslog:server=192.168.1.1; -access_log syslog:server=unix:/var/log/nginx.sock; -access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined; - - - - - -Запись в syslog доступна начиная с версии 1.7.1. -Как часть -коммерческой подписки -запись в syslog доступна начиная с версии 1.5.3. - - - diff --git a/xml/ru/docs/index.xml b/xml/ru/docs/index.xml --- a/xml/ru/docs/index.xml +++ b/xml/ru/docs/index.xml @@ -46,6 +46,10 @@ + + + + diff --git a/xml/ru/docs/ngx_core_module.xml b/xml/ru/docs/ngx_core_module.xml --- a/xml/ru/docs/ngx_core_module.xml +++ b/xml/ru/docs/ngx_core_module.xml @@ -10,7 +10,7 @@ + rev="11">
@@ -171,7 +171,7 @@ events { Если имя файла не абсолютное, к нему добавляется в начало путь префикса. --> Специальное значение stderr выбирает стандартный файл ошибок. -Запись в syslog настраивается указанием префикса +Запись в syslog настраивается указанием префикса “syslog:”. @@ -191,70 +191,6 @@ nginx с --with-debug, - -Запись в syslog настраивается при помощи следующих параметров: - - -server=адрес - -Задаёт адрес сервера syslog. -Адрес может быть указан в виде доменного имени или IP-адреса, -и необязательного порта, или в виде пути UNIX-сокета, который -указывается после префикса “unix:”. -Если порт не указан, используется порт 514. -Если доменному имени соответствует несколько IP-адресов, -используется только первый адрес. - - -facility=строка - -Задаёт категорию сообщений syslog в соответствии с -RFC 3164. -В качестве категории может быть указано одно из следующих значений: -“kern”, “user”, -“mail”, “daemon”, -“auth”, “intern”, -“lpr”, “news”, “uucp”, -“clock”, “authpriv”, -“ftp”, “ntp”, “audit”, -“alert”, “cron”, -“local0”..“local7”. -По умолчанию используется “local7”. - - -tag=строка - -Задаёт метку сообщений syslog. -По умолчанию используется “nginx”. - - - - - -Пример конфигурации syslog: - -error_log syslog:server=192.168.1.1 debug; -error_log syslog:server=unix:/var/log/nginx.sock; -error_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx error; - - - - - -Запись в syslog доступна начиная с версии 1.7.1. -Как часть -коммерческой подписки -запись в syslog доступна начиная с версии 1.5.3. - - - diff --git a/xml/ru/docs/syslog.xml b/xml/ru/docs/syslog.xml new file mode 100644 --- /dev/null +++ b/xml/ru/docs/syslog.xml @@ -0,0 +1,100 @@ + + + + + + +
+ +
+ + +Директивы + +и + +поддерживают запись в syslog. +Запись в syslog настраивается при помощи следующих параметров: + + +server=адрес + +Задаёт адрес сервера syslog. +Адрес может быть указан в виде доменного имени, IP-адреса или +в виде пути UNIX-сокета (указывается после префикса +“unix:”). +Вместе с именем или адресом может быть указан порт. +Если порт не указан, используется порт 514. +Если доменному имени соответствует несколько IP-адресов, +используется только первый адрес. + + +facility=строка + +Задаёт категорию сообщений syslog в соответствии с +RFC 3164. +В качестве категории может быть указано одно из следующих значений: +“kern”, “user”, +“mail”, “daemon”, +“auth”, “intern”, +“lpr”, “news”, “uucp”, +“clock”, “authpriv”, +“ftp”, “ntp”, “audit”, +“alert”, “cron”, +“local0”..“local7”. +По умолчанию используется “local7”. + + +severity=строка + +Задаёт важность сообщений syslog для + +в соответствии с +RFC 3164. +Возможны те же самые значения, что и у второго параметра (уровень) +директивы . +По умолчанию используется “info”. + + +tag=строка + +Задаёт метку сообщений syslog. +По умолчанию используется “nginx”. + + + + + +Пример конфигурации syslog: + +error_log syslog:server=192.168.1.1 debug; + +access_log syslog:server=unix:/var/log/nginx.sock; +access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined; + + + + + +Запись в syslog доступна начиная с версии 1.7.1. +Как часть +коммерческой подписки +запись в syslog доступна начиная с версии 1.5.3. + + + +
+ +
diff --git a/xml/ru/index.xml b/xml/ru/index.xml --- a/xml/ru/index.xml +++ b/xml/ru/index.xml @@ -8,7 +8,7 @@
+ rev="26">
@@ -131,7 +131,8 @@ chunked ответы, форматов логов, буферизованная запись в лог, -быстрая ротация логов; +быстрая ротация логов, +запись в syslog;