class Fluent::NoMatchMatch

Public Class Methods

new(log) click to toggle source
# File lib/fluent/match.rb, line 152
def initialize(log)
  @log = log
  @count = 0
  @warn_not_matched = true
end

Public Instance Methods

emit_events(tag, es) click to toggle source
# File lib/fluent/match.rb, line 163
def emit_events(tag, es)
  return unless @warn_not_matched
  # TODO use time instead of num of records
  c = (@count += 1)
  if c < 512
    if Math.log(c) / Math.log(2) % 1.0 == 0
      @log.warn "no patterns matched", tag: tag
      return
    end
  else
    if c % 512 == 0
      @log.warn "no patterns matched", tag: tag
      return
    end
  end
  @log.on_trace { @log.trace "no patterns matched", tag: tag }
end
shutdown() click to toggle source
# File lib/fluent/match.rb, line 184
def shutdown
end
start() click to toggle source
# File lib/fluent/match.rb, line 181
def start
end
suppress_missing_match!() click to toggle source
# File lib/fluent/match.rb, line 158
def suppress_missing_match!
  # for <label @FLUENT_LOG>
  @warn_not_matched = false
end