Class: CustomLogSpace::BaseSubscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Includes:
LogFormatter, LogWriter
Defined in:
lib/custom_log_space/subscribers/base_subscriber.rb

Overview

CustomLogSpace::Subscriber is a class for handling custom logging in Rails applications. It provides methods for processing different types of log events and organizing log messages. github.com/rails/rails/blob/7-0-stable/activesupport/lib/active_support/log_subscriber.rb

Direct Known Subclasses

SQLSubscriber, ViewSubscriber

Instance Method Summary collapse

Instance Method Details

#process_action(event) ⇒ Object



19
20
21
22
23
# File 'lib/custom_log_space/subscribers/base_subscriber.rb', line 19

def process_action(event)
  message = format_message(event)
  log_message(message)
  ThreadManager.clear
end

#start_processing(event) ⇒ Object



15
16
17
# File 'lib/custom_log_space/subscribers/base_subscriber.rb', line 15

def start_processing(event)
  ThreadManager.setup(event.payload)
end