Sha256: 9875fcff3e231e1b0d08ce17f4c3157a205f31acb35002e2c65a75c3f6f93fc8

Contents?: true

Size: 686 Bytes

Versions: 9

Compression:

Stored size: 686 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.

module NewRelic::Agent::Instrumentation
  module Logger
    def self.instrument!
      ::Logger.class_eval do
        include NewRelic::Agent::Instrumentation::Logger

        alias_method :format_message_without_new_relic, :format_message

        def format_message(severity, datetime, progname, msg)
          format_message_with_tracing(severity, datetime, progname, msg) do
            format_message_without_new_relic(severity, datetime, progname, msg)
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
newrelic_rpm-8.9.0 lib/new_relic/agent/instrumentation/logger/chain.rb
newrelic_rpm-8.8.0 lib/new_relic/agent/instrumentation/logger/chain.rb
newrelic_rpm-8.7.0 lib/new_relic/agent/instrumentation/logger/chain.rb
newrelic_rpm-8.6.0 lib/new_relic/agent/instrumentation/logger/chain.rb
newrelic_rpm-8.5.0 lib/new_relic/agent/instrumentation/logger/chain.rb
newrelic_rpm-8.4.0 lib/new_relic/agent/instrumentation/logger/chain.rb
newrelic_rpm-8.3.0 lib/new_relic/agent/instrumentation/logger/chain.rb
newrelic_rpm-8.2.0 lib/new_relic/agent/instrumentation/logger/chain.rb
newrelic_rpm-8.1.0 lib/new_relic/agent/instrumentation/logger/chain.rb