Module: LogStash::PluginMixins::DeprecationLoggerSupport::LegacyLoggableWarnAdapter

Defined in:
lib/logstash/plugin_mixins/deprecation_logger_support/legacy_loggable_warn_adapter.rb

Overview

The LegacyLoggableWarnAdapter provides a #deprecation_logger returning a DeprecationLogger that is implemented via Loggable#warn.

API:

  • internal (@see DeprecationLoggerSupport::included)

Instance Method Summary collapse

Instance Method Details

#deprecation_loggerDeprecationLogger

Returns:

API:

  • internal (@see DeprecationLoggerSupport::included)



51
52
53
54
55
56
57
# File 'lib/logstash/plugin_mixins/deprecation_logger_support/legacy_loggable_warn_adapter.rb', line 51

def deprecation_logger
  # threadsafe at-most-once memoize
  # NOTE: the instance variable used here is _not_ a public part of the API.
  @_deprecation_logger_legacy_adapter || MEMOIZE_MUTEX.synchronize do
    @_deprecation_logger_legacy_adapter ||= DeprecationLogger.new(logger)
  end
end