Class: Mbeditor::CableLogFilter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/mbeditor/cable_log_filter.rb

Overview

Wraps the ActionCable logger and suppresses all log lines that mention Mbeditor channels so the development console stays readable. Non-Mbeditor ActionCable messages pass through unchanged.

Constant Summary collapse

SUPPRESS_PATTERN =
/Mbeditor::|mbeditor_editor/

Instance Method Summary collapse

Instance Method Details

#tagged(*tags, &block) ⇒ Object

Tagged-logging compat — the block body still passes through the filter.



20
21
22
23
24
25
26
# File 'lib/mbeditor/cable_log_filter.rb', line 20

def tagged(*tags, &block)
  if __getobj__.respond_to?(:tagged)
    __getobj__.tagged(*tags) { block.call }
  else
    block.call
  end
end