Class: Datadog::SymbolDatabase::Logger Private
- Inherits:
-
Object
- Object
- Datadog::SymbolDatabase::Logger
- Extended by:
- Forwardable
- Defined in:
- lib/datadog/symbol_database/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 that adds a config-gated trace method.
Wraps any logger (customer-provided or default) and delegates
standard methods. The trace method is a sub-debug level that
is a no-op unless DD_TRACE_DEBUG is set, avoiding overhead for
high-frequency log sites (per-module filtering, dedup checks).
Instance Attribute Summary collapse
- #settings ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(settings, target) ⇒ Logger
constructor
private
A new instance of Logger.
-
#trace { ... } ⇒ void
private
Log at trace level (sub-debug).
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.
20 21 22 23 |
# File 'lib/datadog/symbol_database/logger.rb', line 20 def initialize(settings, target) @settings = settings @target = target end |
Instance Attribute Details
#settings ⇒ Object (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.
25 26 27 |
# File 'lib/datadog/symbol_database/logger.rb', line 25 def settings @settings end |
Instance Method Details
#trace { ... } ⇒ void
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.
This method returns an undefined value.
Log at trace level (sub-debug). No-op unless DD_TRACE_DEBUG is set.
36 37 38 39 40 |
# File 'lib/datadog/symbol_database/logger.rb', line 36 def trace(&block) if settings.symbol_database.internal.trace_logging debug(&block) end end |