Class: Datadog::DI::Logger Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/datadog/di/logger.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Logger facade to add the trace method.

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings, target) ⇒ Logger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Logger.

API:

  • private



13
14
15
16
# File 'lib/datadog/di/logger.rb', line 13

def initialize(settings, target)
  @settings = settings
  @target = target
end

Instance Attribute Details

#settingsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



18
19
20
# File 'lib/datadog/di/logger.rb', line 18

def settings
  @settings
end

#targetObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



19
20
21
# File 'lib/datadog/di/logger.rb', line 19

def target
  @target
end

Instance Method Details

#trace(&block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



23
24
25
26
27
# File 'lib/datadog/di/logger.rb', line 23

def trace(&block)
  if settings.dynamic_instrumentation.internal.trace_logging
    debug(&block)
  end
end