Sha256: 59a486abd119c8adff108053c9b0dc830602badfb763d8e614760e91baf481b1

Contents?: true

Size: 396 Bytes

Versions: 6

Compression:

Stored size: 396 Bytes

Contents

module Aws
  module Embedded
    module Metrics
      module Sinks
        class Logger

          attr_reader :logger, :level

          def initialize(logger, level: :info)
            @logger = logger
            @level = level.to_sym
          end

          def accept(message)
            logger.public_send(level, JSON.dump(message))
          end

        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
aws-embedded-metrics-customink-0.8.0 lib/aws-embedded-metrics-customink/sinks/logger.rb
aws-embedded-metrics-customink-0.6.0 lib/aws-embedded-metrics-customink/sinks/logger.rb
aws-embedded-metrics-customink-0.5.0 lib/aws-embedded-metrics-customink/sinks/logger.rb
aws-embedded-metrics-customink-0.4.0 lib/aws-embedded-metrics-customink/sinks/logger.rb
aws-embedded-metrics-customink-0.3.0 lib/aws-embedded-metrics-customink/sinks/logger.rb
aws-embedded-metrics-customink-0.2.0 lib/aws-embedded-metrics-customink/sinks/logger.rb