Class: Cakewalk::LogFilter Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/cakewalk/log_filter.rb

Overview

This class is abstract.

LogFilter describes an interface for filtering log messages before they’re printed.

Since:

  • 2.3.0

Instance Method Summary collapse

Instance Method Details

#filter(message, event) ⇒ String?

filter is called for each log message, except for exceptions. It returns a new string, which is the one that should be printed, or further filtered by other filters. Returning nil will drop the message.

Parameters:

  • message (String)

    The message that is to be logged

  • event (:debug, :incoming, :outgoing, :info, :warn, :exception, :error, :fatal)

    The kind of message

Returns:

  • (String, nil)

    The modified message, as it should be logged, or nil if the message shouldn’t be logged at all

Since:

  • 2.3.0



18
19
# File 'lib/cakewalk/log_filter.rb', line 18

def filter(message, event)
end