Opened 8 years ago
option to send the access log to stdout
|Reported by:||Igor Bukanov||Owned by:|
|nginx -V:||nginx version: nginx/1.6.1 (Ubuntu)|
When nginx runs in a container or under a process manager that provide own logging facilities or to prevent the nginx process from manipulate the written log it would be useful if the
access_log directive supported setting the log path to stdout similarly as
error_log allows to send the log to stderr.
As a workaround in some cases one can use
access_log /dev/stdout or similar. However, as nginx calls
open() on the supplied path that may fail depending on how the receiving end of stderr and its permissions is set up. A better workaround is to use mkfifo to create a named pipe and then use
cat /path-to-pipe to send the log out, but this is messy.