Sha256: 0abad89776cfbda64c382314248bf6459763a54f1c50e29f64f419a7a668a335

Contents?: true

Size: 635 Bytes

Versions: 54

Compression:

Stored size: 635 Bytes

Contents

# typed: false
# frozen_string_literal: true

require "lograge"

Rails.application.configure do
  config.lograge.enabled = true
  config.lograge.custom_options = lambda do |event|
    span = OpenTelemetry::Trace.current_span
    {
      time: event.time,
      trace_id: span.context.hex_trace_id,
      span_id: span.context.hex_span_id,
    }
  end

  config.lograge.custom_payload do |controller|
    payload = {
      host: controller.request.host,
    }

    payload
  end

  config.lograge.keep_original_rails_log = true
  config.lograge.logger = ActiveSupport::Logger.new(Rails.root.join("log", "lograge_#{Rails.env}.log"))
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
hephaestus-0.8.7.2 config/initializers/lograge.rb
hephaestus-0.8.7.1 config/initializers/lograge.rb
hephaestus-0.8.7 config/initializers/lograge.rb
hephaestus-0.8.6 config/initializers/lograge.rb
hephaestus-0.8.5 config/initializers/lograge.rb
hephaestus-0.8.4.1 config/initializers/lograge.rb
hephaestus-0.8.4 config/initializers/lograge.rb
hephaestus-0.8.3.4 config/initializers/lograge.rb
hephaestus-0.8.3.3 config/initializers/lograge.rb
hephaestus-0.8.3.2 config/initializers/lograge.rb
hephaestus-0.8.3.1 config/initializers/lograge.rb
hephaestus-0.8.3 config/initializers/lograge.rb
hephaestus-0.8.2 config/initializers/lograge.rb
hephaestus-0.8.1 config/initializers/lograge.rb
hephaestus-0.8.0 config/initializers/lograge.rb
hephaestus-0.7.7.2 config/initializers/lograge.rb
hephaestus-0.7.7 config/initializers/lograge.rb
hephaestus-0.7.6.2 config/initializers/lograge.rb
hephaestus-0.7.6.1 config/initializers/lograge.rb
hephaestus-0.7.6 config/initializers/lograge.rb