Sha256: cbac949d087697d5891601c58efa9b8826eb8936b24d5602ba65db9f63487cb1

Contents?: true

Size: 428 Bytes

Versions: 2

Compression:

Stored size: 428 Bytes

Contents

require 'rails'
require 'lograge'

module Metova
  module Logger
    class Railtie < ::Rails::Railtie

      config.log_tags = [
        lambda { |request| request.uuid[0..15] }
      ]

      config.lograge.enabled = true
      config.lograge.custom_options = lambda do |event|
        {
          time: event.time,
          user: event.payload[:user],
          ip: event.payload[:ip],
        }
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metova-logger-0.0.3 lib/metova/logger/railtie.rb
metova-logger-0.0.2 lib/metova/logger/railtie.rb