Module: Datadog::Core::Deprecations
- Included in:
- Datadog::Core
- Defined in:
- lib/datadog/core/deprecations.rb
Overview
Contains behavior for handling deprecated functions in the codebase.
Instance Method Summary collapse
-
#log_deprecation(disallowed_next_major: true, key: nil) ⇒ Object
Records the occurrence of a deprecated operation in this library.
Instance Method Details
#log_deprecation(disallowed_next_major: true, key: nil) ⇒ Object
Records the occurrence of a deprecated operation in this library.
Currently, these operations are logged to ‘Datadog.logger` at `warn` level.
‘disallowed_next_major` adds a message informing that the deprecated operation won’t be allowed in the next major release.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/datadog/core/deprecations.rb', line 17 def log_deprecation(disallowed_next_major: true, key: nil) return unless log_deprecation?(key) Datadog.logger.warn do = yield += ' This will be enforced in the next major release.' if disallowed_next_major end # Track the deprecation being logged. deprecation_logged!(key) nil end |