lib/rflow/logger.rb in rflow-1.3.1 vs lib/rflow/logger.rb in rflow-1.3.2
- old
+ new
@@ -131,10 +131,12 @@
def hook_up_logfile
if log_file_path
begin
internal_logger.add FileOutputter.new('rflow.log_file', :filename => log_file_path, :formatter => LOG_PATTERN_FORMATTER)
rescue Exception => e
- raise ArgumentError, "Log file '#{File.expand_path log_file_path}' problem: #{e.message}\n#{e.backtrace.join("\n")}"
+ # at least output the failure to stderr
+ internal_logger.add StderrOutputter.new('rflow_stderr', :formatter => LOG_PATTERN_FORMATTER)
+ raise ArgumentError, "Log file '#{File.expand_path log_file_path}' problem: #{e.message}"
end
end
end
def hook_up_stdout