Log directly to stdout/stderr
mars opened this issue · 2 comments
With everything else set per the solo config example, the following changes make Nginx log directly to stdout/stderr without intermediate filesystem writes & reads as well as no longer needing the multi-process handing in the start-up script:
error_log /dev/stdout info;
http {
access_log /dev/stdout l2met;
}
This change would eliminate traffic-induced filesystem IO and eliminate filesystem consumption by logs.
Would these changes be welcome? To avoid breaking existing usages, we could offer them as a another option of start-up process, and example config/nginx.conf.erb
.
Oh my, I was just looking for this! Please, make it happen, @mars!
(Also, 👋 Hi Mars! Hope you're doing well.)
Actually, it looks like error_log
supports a special value, stderr
to send directly to standard error. Though I think access_log
still needs to point at /dev/stdout
.