Permalink
Browse files

Must specify full path for rails logger

  • Loading branch information...
1 parent 6a45912 commit 76ee2d0cc22c18fe695ea39f0adc4587d4ae7c72 @afcapel committed Jan 10, 2012
Showing with 6 additions and 9 deletions.
  1. +6 −9 lib/generators/alondra/templates/alondra
@@ -6,28 +6,25 @@ require 'rubygems'
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'daemons'
-
-log_dir = File.expand_path('../log', File.dirname(__FILE__))
-
options = {
:app_name => 'alondra',
:dir_mode => :script,
- :dir => 'log',
- :log_dir => log_dir
+ :dir => 'tmp/pids'
}
Daemons.run_proc 'alondra', options do
ENV["ALONDRA_SERVER"] = 'true'
+
require_relative File.join('..', 'config', 'environment')
-
- log_path = File.join(log_path, 'alondra.log')
+
+ log_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'log', 'alondra.log'))
+
Rails.logger = ActiveSupport::BufferedLogger.new(log_path)
- Alondra::Alondra.start_server!
-
Rails.logger.info "Started alondra server... #{EM.reactor_running?}"
EM.reactor_thread.join
+
Rails.logger.info 'Alondra server terminated'
end

0 comments on commit 76ee2d0

Please sign in to comment.