A boolean processor that returns the boolean negation of a given processor.
For example, this builds a processor that sends formatted log records to STDOUT only if they do NOT have a “user” attribute of “daniel”:
processor = Sawmill::RecordProcessor.build do If(Not(FilterByAttributes('user' => 'daniel')), Format(STDOUT)) end
Create a “not” boolean. The parameter is a boolean processor to run. This processor returns the boolean negation of its output.
# File lib/sawmill/record_processor/conditionals.rb, line 112 def initialize(child_) @child = _interpret_processor(child_) end
# File lib/sawmill/record_processor/conditionals.rb, line 120 def extra_entry(entry_) !@child.extra_entry(record_) end
# File lib/sawmill/record_processor/conditionals.rb, line 124 def finish @child.finish end
# File lib/sawmill/record_processor/conditionals.rb, line 116 def record(record_) !@child.record(record_) end