scout_realtime icon indicating copy to clipboard operation
scout_realtime copied to clipboard

Args for setting log path and pid path ignored in mkdir ~/.scout call

Open jpotter opened this issue 11 years ago • 1 comments

Hi,

On our system, we're running scout under a supervisor where $HOME isn't writeable.

The code has this:

# by default, scout_realtime puts its pid and logfile in ~/.scout/
home_dir =  File.join( (File.expand_path("~") rescue "/"), ".scout" )
FileUtils.mkdir_p(home_dir) # ensure home directory exists
pid_path = File.join(home_dir, "scout_realtime.pid")
log_path = File.join(home_dir, "scout_realtime.log")

This code fails, even when --pid-file and --log-file point those entries elsewhere.

Can the mkdir_p call be moved to where the pid_path and log_path are opened, and run on the directories associated with those values, as opposed to assuming it's going to be under ~/.scout?

Thanks! Jeff

jpotter avatar Jul 03 '14 22:07 jpotter

Hi @jpotter, I agree this would be a good addition, and I'd be happy to review a pull request for it.

andre avatar Jul 07 '14 16:07 andre