Skip to content

Application load errors are lost when run in daemon mode #285

@mkwiatkowski

Description

@mkwiatkowski

Minimal example:

# config.ru
problem
# puma-config.rb
pidfile 'tmp/puma.pid'
state_path 'tmp/puma.state'
stdout_redirect 'log/puma.stdout', 'log/puma.stderr'

When run without -d option application error is logged to stderr.

$ puma -C puma-config.rb 
Puma 2.1.0 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://0.0.0.0:9292
config.ru:4:in `block in <main>': undefined local variable or method `problem' for #<Rack::Builder:0xa22c6f8 @map=nil, @run=nil, @use=[]> (NameError)

When run with -d option the application error is lost, neither written to stderr nor to the file specified in stdout_redirect.

In my opinion it should always log the application load errors to the file if stdout_redirect was specified.

Confirmed on current master.

Was mentioned in #253 (comment) by @sabcio.

I will come up with a pull request for this in the next few days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions