Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log directly to stdout/stderr #112

Open
mars opened this issue Feb 28, 2023 · 2 comments
Open

Log directly to stdout/stderr #112

mars opened this issue Feb 28, 2023 · 2 comments

Comments

@mars
Copy link
Member

mars commented Feb 28, 2023

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.

@stevenharman
Copy link
Contributor

Oh my, I was just looking for this! Please, make it happen, @mars!

(Also, 👋 Hi Mars! Hope you're doing well.)

@stevenharman
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants