config/unicorn/staging.conf
worker_processes 4
after_fork do |server, worker|
$worker_nr = worker.nr
end
config/application.rb
module MyApp
class Application < Rails::Application
#... lots of config options
config.logger = ActiveSupport::TaggedLogging.new(Logger.new(Rails.root.join("log", "#{Rails.env}_#{$worker_nr}.log").to_s))
end
end
Posted by Bonyiii to Bonyiii's deck (2014-11-12 11:52)