lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.3.5 vs lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.3.6

- old
+ new

@@ -3,10 +3,14 @@ require 'fluent/mixin/config_placeholders' class S3Output < Fluent::TimeSlicedOutput Fluent::Plugin.register_output('s3', self) + unless method_defined?(:log) + define_method(:log) { $log } + end + def initialize super require 'aws-sdk' require 'zlib' require 'time' @@ -175,10 +179,10 @@ private def ensure_bucket if !@bucket.exists? if @auto_create_bucket - $log.info "Creating bucket #{@s3_bucket} on #{@s3_endpoint}" + log.info "Creating bucket #{@s3_bucket} on #{@s3_endpoint}" @s3.buckets.create(@s3_bucket) else raise "The specified bucket does not exist: bucket = #{@s3_bucket}" end end