When running under passenger in production mode ( which uses buffered logging ) when an error occurs, but possibly in
normal operation, log messages are lost due to the call to exit! in the child process.
In addition not all errors are caught due to the use of rescue instead of rescue Exception.
Finally the initial "spawn> method" log entry is not displayed in stderr due to an invalid test on
RAILS_DEFAULT_LOGGER.
The attached patch all of these issues. |