Module: Concurrent::Concern::Deprecation
- Extended by:
- Deprecation
- Includes:
- Concern::Logging
- Included in:
- Deprecation
- Defined in:
- lib/logstash/patches/silence_concurrent_ruby_warning.rb
Instance Method Summary collapse
Instance Method Details
#deprecated(message, strip = 2) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/logstash/patches/silence_concurrent_ruby_warning.rb', line 26 def deprecated(, strip = 2) caller_line = caller(strip).first if strip > 0 klass = if Module === self self else self.class end = if strip > 0 format("[DEPRECATED] %s\ncalled on: %s", , caller_line) else format('[DEPRECATED] %s', ) end # lets use our logger logger = Cabin::Channel.get(LogStash) logger.debug(, :class => klass.to_s) end |