-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Log loaded extensions when PUMA_DEBUG
is set
#3036
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
Conversation
Re: tests, I see there's |
Added tests. After #3035, I may try to add a count of the extensions to the two tests, so we'll know if there are additions. Question - while running locally, I wondered if Puma in 'cluster' mode should log both master process and worker0 loaded extensions? Currently it only logs worker0. |
👍
I can only see it as a positive to log both |
9c3d7d2
to
01b013a
Compare
Changed to show both master and worker0 when running clustered. Sample output below: Puma Clustered
Puma Single
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug_loaded_extensions
includes if @log_writer.debug?
so no need to guard the method calls with it, right?
Not sure. I felt it was unlikely that many people would regularly be using |
If we want to remove Line 60 in 01b013a
|
Sorry and thanks for pointing that out, my mistake. Fixed in single.rb, removed conditional in runner.rb, with a comment... |
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Wait on merge until I push 6.0.2 though 😄 |
@MSP-Greg Merge when ready 👍 |
PUMA_DEBUG
is set
* log loaded extensions when env['PUMA_DEBUG'] is set Co-authored-by: Jeremy Evans <code@jeremyevans.net> * Add tests * IO.popen change for JRuby ? * Fix !DRY code Co-authored-by: Jeremy Evans <code@jeremyevans.net> Co-authored-by: Patrik Ragnarsson <patrik@starkast.net>
Description
This implements the feature requested in #3020, printing the loaded extensions if PUMA_DEBUG is set.
When Puma is running 'single' (no workers), the log is done in the main Puma process, after
Server#run
has been called, as some extensions maybe loaded in that call. For Puma running 'clustered' (workers used), the log is generated in Worker index 0, afterServer#run
is called and also in the master process.Log is also generated on phased-restarts.
Added a test for both, small refactor (moved functionality to
integration.rb
) for using a control server in CI.Closes #3020
Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.