lib/navy/rank.rb in navy-1.0.5 vs lib/navy/rank.rb in navy-1.0.6

- old
+ new

@@ -1,14 +1,17 @@ class Navy::Rank attr_accessor :orders - attr_accessor :before_fork, :after_fork, :before_exec - attr_accessor :reexec_pid + attr_accessor :before_fork, :after_fork, :before_exec, :post_fork + attr_reader :stdout_path, :stderr_path + attr_accessor :reexec_pid, :orig_stdout, :orig_stderr, :current_stdout, :current_stderr def logger - @logger ||= orders[:logger] + (@logger ||= orders[:logger]).tap do |log| + log.scope = self #if log.respond_to?(:scope=) + end end attr_writer :logger attr_reader :options @@ -43,11 +46,17 @@ end attr_reader :pid attr_accessor :preload - def stdout_path=(path); redirect_io($stdout, path); end - def stderr_path=(path); redirect_io($stderr, path); end + def stdout_path=(path) + @stdout_path = path + redirect_io($stdout, path) + end + def stderr_path=(path) + @stderr_path = path + redirect_io($stderr, path) + end attr_accessor :timeout private \ No newline at end of file