FS#38011 - [nginx] Unable to log errors to stderr due to configured error-log-path
Attached to Project:
Community Packages
Opened by ... (spider007) - Wednesday, 04 December 2013, 14:44 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Tuesday, 24 December 2013, 08:43 GMT
Opened by ... (spider007) - Wednesday, 04 December 2013, 14:44 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Tuesday, 24 December 2013, 08:43 GMT
|
Details
Description:
nginx is configured with --error-log-path=/var/log/nginx/error.log. This makes it impossible to log errors to stderr from the configuration file. from http://nginx.org/en/docs/ngx_core_module.html: > The first parameter defines a file that will store the log. The special value stderr selects the standard error file. This means that configuring "error_log stderr" will NOT log to stderr, but to the default error-file, (the compiled-in file). from http://wiki.nginx.org/InstallOptions: > After installation, the file name can always be changed in the nginx.conf configuration file using the error_log > directive. By default the file is named prefix/logs/error.log. The special "stderr" value tells nginx to > log pre-configuration messages to the standard error. Aka when using "stderr" as compile-flag, output will be send to stderr as expected This means that currently (error-log-path=file) it is impossible to log to stderr from the configuration file (you can only specify an alternative file). If however nginx would be compiled with error-log-path=stderr, the configuration could use stderr (to log to stderr) or a file-name. I have confirmed this by compiling nginx with --error-log-path=stderr |
This task depends upon
Closed by Bartłomiej Piotrowski (Barthalion)
Tuesday, 24 December 2013, 08:43 GMT
Reason for closing: Fixed
Additional comments about closing: nginx 1.4.4-2
Tuesday, 24 December 2013, 08:43 GMT
Reason for closing: Fixed
Additional comments about closing: nginx 1.4.4-2