Sha256: c04796c48abaeb508fb84f27c2166cbf672ef0853997947f559874c4b8eaf2b2

Contents?: true

Size: 616 Bytes

Versions: 63

Compression:

Stored size: 616 Bytes

Contents

# typed: false
# frozen_string_literal: true

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

63 entries across 63 versions & 1 rubygems

Version Path
hephaestus-0.8.11 templates/config/initializers/lograge.rb
hephaestus-0.8.10 templates/config/initializers/lograge.rb
hephaestus-0.8.9.2 templates/config/initializers/lograge.rb
hephaestus-0.8.9.1 templates/config/initializers/lograge.rb
hephaestus-0.8.9 templates/config/initializers/lograge.rb
hephaestus-0.8.8 templates/config/initializers/lograge.rb
hephaestus-0.8.7.5 templates/config/initializers/lograge.rb
hephaestus-0.8.7.4 templates/config/initializers/lograge.rb
hephaestus-0.8.7.3 templates/config/initializers/lograge.rb
hephaestus-0.8.7.2 templates/config/initializers/lograge.rb
hephaestus-0.8.7.1 templates/config/initializers/lograge.rb
hephaestus-0.8.7 templates/config/initializers/lograge.rb
hephaestus-0.8.6 templates/config/initializers/lograge.rb
hephaestus-0.8.5 templates/config/initializers/lograge.rb
hephaestus-0.8.4.1 templates/config/initializers/lograge.rb
hephaestus-0.8.4 templates/config/initializers/lograge.rb
hephaestus-0.8.3.4 templates/config/initializers/lograge.rb
hephaestus-0.8.3.3 templates/config/initializers/lograge.rb
hephaestus-0.8.3.2 templates/config/initializers/lograge.rb
hephaestus-0.8.3.1 templates/config/initializers/lograge.rb