Feature Request for access_log stdout;
ahutchings at nginx.com
Thu Feb 18 09:16:45 UTC 2016
On 18/02/16 08:59, Andrew Hutchings wrote:
> Hi Aleksandar,
> On 17/02/16 19:04, Aleksandar Lazic wrote:
>> Am 17-02-2016 16:47, schrieb Valentin V. Bartenev:
>>> On Wednesday 17 February 2016 16:26:01 Aleksandar Lazic wrote:
>>>> how difficult is it to be able to add "access_log stdout;" to nginx,
>>>> similar like "error_log stderr;"?
>>>> I ask because in some PaaS environment is it difficult to setup a
>>>> dedicated user yust for nginx.
>>>> It fits also a little bit better to http://12factor.net/logs
>>> What's the problem with "access_log /dev/stdout"?
>> Well I have the following problem on openshift v3.
>> nginx: [alert] could not open error log file: open()
>> "/var/log/nginx/error.log" failed (13: Permission denied)
>> 2016/02/17 18:34:32 [warn] 1#1: the "user" directive makes sense only if
>> the master process runs with super-user privileges, ignored in
>> 2016/02/17 18:34:32 [emerg] 1#1: open() "/dev/stdout" failed (13:
>> Permission denied)
>> I have no name!@nginx-test-8-emwut:/$
>> I have no name!@nginx-test-8-emwut:/$ ls -la /dev/stdout
>> lrwxrwxrwx. 1 root root 15 Feb 17 18:24 /dev/stdout -> /proc/self/fd/1
>> I have no name!@nginx-test-8-emwut:/$ id
>> uid=1000550000 gid=0(root) groups=0(root)
> What version of Docker are you running? If it is prior to 1.9 you are
> likely to hit his bug: https://github.com/docker/docker/issues/6880
Also, as Valentin mentioned. Performance of any application, not just
NGINX, that logs a lot of data is going to be terrible when you actually
manage to do this.
There are many flaws in the The Factor-Factor App document and whilst it
may work out for you backend services I wouldn't recommend following it
too closely for any core infrastructure.
Andrew Hutchings (LinuxJedi)
Technical Product Manager, NGINX Inc.
More information about the nginx