lib/s3log/runner.rb in s3log-0.0.3 vs lib/s3log/runner.rb in s3log-0.0.4

- old
+ new

@@ -10,10 +10,11 @@ access_key_id: @config['awspublic'], secret_access_key: @config['awsprivate'] ) @bucket = @s3.buckets[@config['bucket']] @prefix = @config['prefix'] + @jobname = @config['jobname'] @logdir = @config['logdir'] FileUtils.mkdir(@logdir) unless Dir.exists? @logdir S3log::Log.set_logger(File.join(@logdir, 's3log.log'), @config['loglevel']) end @@ -28,18 +29,18 @@ end def download if items.size > 0 time = Time.now - S3log::Log.info "Downloading #{items.size} file." + S3log::Log.info "#{@jobname} Downloading #{items.size} file." File.open(@config['outputfile'], 'a+') do |f| items.each do |i| f.puts @bucket.objects[i].read S3log::Log.debug " #{i} added." @bucket.objects[i].delete end end - S3log::Log.info "... done in #{Time.now - time}s." + S3log::Log.info "#{@jobname} ... done in #{Time.now - time}s." else S3log::Log.debug "No file to download." end end