Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Allow log_dir option to be given to #10

merged 2 commits into from

2 participants


Utilizes the :log_dir option of the Daemons gem to allow users to place their pid files in a separate directory than their log files.

For example, you can now launch scheduler_daemon as such:

bundle exec scheduler_daemon start -- --pid_dir=tmp/pids --log_dir=log/


Closing, because upon further testing, it seems this option always causes it to log to /dev/null, so it seems the Daemons gem doesn't properly handle the log_dir option. I'll reopen or recreate if I can figure it out.

@jamoes jamoes closed this
@jamoes jamoes reopened this

Reopening: Daemons simply requires the full path name for its arguments, so in order to utilize this, you'd have to run:

bundle exec scheduler_daemon start -- --pid_dir=/full/path/to/project/tmp/pids --log_dir=/full/path/to/project/log/


Any update on getting this included? The change is pretty straightforward.

@ssoroka ssoroka merged commit eafa976 into ssoroka:master

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 4, 2012
  1. @jamoes
Commits on Aug 5, 2012
  1. @jamoes
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 bin/scheduler_daemon
5 bin/scheduler_daemon
@@ -41,15 +41,18 @@ end
app_args[:dir] ||= Dir.pwd
app_args[:pid_dir] ||= File.expand_path(File.join(app_args[:dir], 'log'))
+app_args[:log_dir] ||= File.expand_path(File.join(app_args[:dir], 'log'))
scheduler = File.join(File.dirname(__FILE__), %w(.. lib loader scheduler_loader.rb))
-raise "#{pid_dir} does not exist" unless File.exist?(app_args[:pid_dir])
+raise "#{app_args[:pid_dir]} does not exist" unless File.exist?(app_args[:pid_dir])
+raise "#{app_args[:log_dir]} does not exist" unless File.exist?(app_args[:log_dir])
app_options = {
:app_name => 'scheduler_daemon',
:ARGV => launch_args(app_args),
:dir_mode => :normal,
:dir => app_args[:pid_dir],
+ :log_dir => app_args[:log_dir],
:multiple => false,
:backtrace => true,
:log_output => true,
Something went wrong with that request. Please try again.