+def record_runtime_log(hostname, start_time: Time.new, is_start: true)
- log_file = "#{LOG_DIR}/#{hostname}"
- if is_start File.open(log_file, 'w') do |f| # fluentd refresh time is 1s # let fluentd to monitor this file first sleep(2) f.puts "\n#{start_time.strftime('%Y-%m-%d %H:%M:%S')} starting QEMU" end
- return start_time
- end
Here is a return cmd, should add one blank line after this block.
Thanks, Xijian