No release in over 3 years
Low commit activity in last 3 years
This gem is meant to be a dependency of any Logstash plugin that wishes to use the Deprecation Logger introduced in 7.6 while maintaining backward-compatibility with earlier Logstashes. When used on older Logstash versions, it provides an implementation of the deprecation logger that forwards deprecation messages to the normal logger at WARN-level with a `DEPRECATED` prefix.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.9

Runtime

 Project Readme

Deprecation Logger Support Mixin

This gem provides an API-compatible implementation of the Logstash Deprecation Logger introduced in Logstash v7.6. It can be added as a dependency of any plugin that wishes to use the deprecation logger while still supporting older Logstash versions.

Usage

  1. Add this gem as a runtime dependency of your plugin:

    Gem::Specification.new do |s|
      # ...
    
      s.add_runtime_dependency 'logstash-mixin-deprecation_logger_support', '~>1.0'
    end
  2. In your plugin code, require this library and include it into your class or module that already inherits LogStash::Util::Loggable:

    require 'logstash/plugin_mixins/deprecation_logger_support'
    
    class LogStash::Inputs::Foo < Logstash::Inputs::Base
      include LogStash::PluginMixins::DeprecationLoggerSupport
    
      # ...
    end
  3. Use the deprecation logger; your plugin does not need to know whether the deprecation logger was provided by Logstash core or by this gem.

      def register
        deprecation_logger.deprecated("your message")
      end

Development

This gem:

  • MUST remain API-stable at 1.x
  • MUST NOT introduce additional runtime dependencies