Sha256: 4b9c3f76bae43e4289e724d5688dcdd0c3dc8c5f18790d88b7e97b32458fbf75

Contents?: true

Size: 343 Bytes

Versions: 1

Compression:

Stored size: 343 Bytes

Contents

# coding: utf-8
require 'fluent/plugin/formatter'

module Fluent
  module Plugin
    class PrettyJsonFormatter < Formatter
      Fluent::Plugin.register_formatter('pretty_json', self)

      def configure(conf)
        super
      end

      def format(tag, time, record)
        "#{JSON.pretty_generate record}\n"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-plugin-formatter_pretty_json-1.0.0 lib/fluent/plugin/formatter_pretty_json.rb