mirror of
https://github.com/meineerde/rackstash.git
synced 2026-01-31 17:27:13 +00:00
Add example to documentation of DropIf filter
This commit is contained in:
parent
40e151ecb8
commit
ad4a40413b
@ -14,6 +14,12 @@ module Rackstash
|
||||
# This filter is a basic example of how you can write filters which abort
|
||||
# further processing of an event. You can write your own filters which
|
||||
# provide similar (but probably more useful) behavior.
|
||||
#
|
||||
# @example
|
||||
# Rackstash::Flow.new(STDOUT) do
|
||||
# # Drop the event if it has the 'debug' tag
|
||||
# filter :drop_if, ->(event) { event['tags'].include?('debug') }
|
||||
# end
|
||||
class DropIf
|
||||
# @param drop_if [#call] a callable object (e.g. a `Proc`) which returns a
|
||||
# truethy or falsey value on `call` with an `event` hash. If it returns
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user