Sha256: 0496999b6f698d01aabd7eaef70ecdf929af212844609b2947cb2558b91bd3f8

Contents?: true

Size: 572 Bytes

Versions: 18

Compression:

Stored size: 572 Bytes

Contents

require "logtail/util"
require "logtail/event"
module Logtail
  module Events
    # @private
    class TemplateRender < Logtail::Event
      attr_reader :message, :name, :duration_ms

      def initialize(attributes)
        @name = attributes[:name]
        @duration_ms = attributes[:duration_ms]
        @message = attributes[:message]
      end

      def to_hash
        {
          template_rendered: Util::NonNilHashBuilder.build do |h|
            h.add(:name, name)
            h.add(:duration_ms, duration_ms)
          end
        }
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
logtail-ruby-0.1.3 lib/logtail/events/template_render.rb
logtail-0.1.13 lib/logtail/events/template_render.rb
logtail-0.1.12 lib/logtail/events/template_render.rb
logtail-0.1.11 lib/logtail/events/template_render.rb
logtail-0.1.10 lib/logtail/events/template_render.rb
logtail-0.1.9 lib/logtail/events/template_render.rb
logtail-0.1.8 lib/logtail/events/template_render.rb
logtail-0.1.7 lib/logtail/events/template_render.rb
logtail-0.1.6 lib/logtail/events/template_render.rb
logtail-0.1.5 lib/logtail/events/template_render.rb
logtail-0.1.4 lib/logtail/events/template_render.rb
logtail-0.1.3 lib/logtail/events/template_render.rb
logtail-0.1.2 lib/logtail/events/template_render.rb
logtail-0.1.1 lib/logtail/events/template_render.rb
logtail-0.1.0 lib/logtail/events/template_render.rb
logtail-ruby-0.1.2 lib/logtail/events/template_render.rb
logtail-ruby-0.1.1 lib/logtail/events/template_render.rb
logtail-ruby-0.1.0 lib/logtail/events/template_render.rb