Closed scicco closed 10 years ago
When starting my application i got the following error:
ERROR -- : undefined method logger' for Unicorn::Rails:Module (NoMethodError) config/unicorn/development.rb:10:inblock in reload'
logger' for Unicorn::Rails:Module (NoMethodError) config/unicorn/development.rb:10:in
this is my config file:
require ::File.expand_path('../../environment', FILE) worker_processes Integer(ENV['WEB_CONCURRENCY'] || 2) timeout 30 preload_app true
before_fork do |server, worker|
ActiveRecord::Base.establish_connection Rails.logger.info('Connected to ActiveRecord') end ...
How can i access the Rails.logger when using this gem?
Thank you in advance.
Fixed in 2.1.0
When starting my application i got the following error:
ERROR -- : undefined method
logger' for Unicorn::Rails:Module (NoMethodError) config/unicorn/development.rb:10:in
block in reload'this is my config file:
require ::File.expand_path('../../environment', FILE) worker_processes Integer(ENV['WEB_CONCURRENCY'] || 2) timeout 30 preload_app true
before_fork do |server, worker|
the following is highly recomended for Rails + "preload_app true"
as there's no need for the master process to hold a connection
ActiveRecord::Base.establish_connection Rails.logger.info('Connected to ActiveRecord') end ...
How can i access the Rails.logger when using this gem?
Thank you in advance.