Class: Logging::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/logging/filter.rb

Overview

The Filter class allows for filtering messages based on event properties independently of the standard minimum-level restriction.

All other Filters inherit from this class, and must override the allow method to return the event if it should be allowed into the log. Otherwise the allow method should return nil.

Direct Known Subclasses

Logging::Filters::Level

Instance Method Summary collapse

Instance Method Details

#allow(event) ⇒ Object

Returns the event if it should be allowed into the log. Returns nil if the event should not be allowed into the log. Subclasses should override this method and provide their own filtering semantics.



14
15
16
# File 'lib/logging/filter.rb', line 14

def allow( event )
  event
end