1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Log environment using option value (#2799)

It's possible for the configured environment to be something other than
`RACK_ENV`, e.g. `APP_ENV` or `RAILS_ENV`, but the runner will always
log the value of `RACK_ENV`.

This changes the log output to show the configured environment value.

See https://github.com/puma/puma/blob/v5.5.2/lib/puma/configuration.rb#L203
This commit is contained in:
Alex Smith 2022-01-22 23:54:00 +11:00 committed by GitHub
parent 3f3c2f6eb0
commit ca2128f179
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,12 +94,13 @@ module Puma
def output_header(mode)
min_t = @options[:min_threads]
max_t = @options[:max_threads]
environment = @options[:environment]
log "Puma starting in #{mode} mode..."
log "* Puma version: #{Puma::Const::PUMA_VERSION} (#{ruby_engine}) (\"#{Puma::Const::CODE_NAME}\")"
log "* Min threads: #{min_t}"
log "* Max threads: #{max_t}"
log "* Environment: #{ENV['RACK_ENV']}"
log "* Environment: #{environment}"
if mode == "cluster"
log "* Master PID: #{Process.pid}"