A boolean processor that returns the boolean negation of a given processor.
For example, this builds a processor that sends formatted log entries to STDOUT only if their level is NOT at least INFO:
processor = Sawmill::EntryProcessor.build do If(Not(FilterByBasicFields(:level => :INFO)), 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/entry_processor/conditionals.rb, line 136 def initialize(child_) @child = _interpret_processor(child_) end
# File lib/sawmill/entry_processor/conditionals.rb, line 152 def attribute(entry_) !@child.attribute(entry_) end
# File lib/sawmill/entry_processor/conditionals.rb, line 140 def begin_record(entry_) !@child.begin_record(entry_) end
# File lib/sawmill/entry_processor/conditionals.rb, line 144 def end_record(entry_) !@child.end_record(entry_) end
# File lib/sawmill/entry_processor/conditionals.rb, line 160 def finish @child.finish end
# File lib/sawmill/entry_processor/conditionals.rb, line 148 def message(entry_) !@child.message(entry_) end
# File lib/sawmill/entry_processor/conditionals.rb, line 156 def unknown_data(entry_) !@child.unknown_data(entry_) end