ruby on rails - No log messages in production.log -
i wrote demo helloworld rails app , tested webrick (it doesn't use db, it's controller prints "hello world"). tried deploy local apache powered passenger. in fact test passenger working (it's first deploy on apache). i'm not sure passenger works, don't error on apache side.
when fire http://rails.test/
browser shows rails 500 error page - assume passenger works. i want investigate logs, happens production.log empty! don't think it's permission problem, because if delete file, recreated when reload page. tried change log level in conf/environments/production.rb
, tried manually write log file rails console production and
rails.logger.error('asdf')
it returns true
nothing gets written production.log. path (obtained per rails.logger.inspect) correct, , remark file recreated if manually remove it. how can know what's going on?
(i checked apache logs, plus set highest debug level passenger seems rails problem, not logged server)
assuming you're running rails 3.2.1, bug. patched in 3.2.2.
if can't upgrade 3.2.2 reason, this comment on github has workaround:
# config/initializers/patch_rails_production_logging.rb rails.logger.instance_variable_get(:@logger).instance_variable_get(:@log_dest).sync = true if rails.logger
Comments
Post a Comment