RailsSemanticLogger::Rack::Logger.logger.level = :info # useful for remaining log like "[Rack::Log] Started..." SemanticLogger.clear_appenders! # Zeitwerk reload message Rails.autoloaders.main.on_load('ApplicationController') { SemanticLogger[:Zeitwerk].debug('reload!') } all_notifications = { action_controller: %i[start_processing process_action redirect_to], action_view: %i[render_partial render_template render_collection render_layout], active_record: %i[sql strict_loading instantiation start_transaction transaction] } Rails.configuration.after_initialize do all_notifications.each do |event_group, hooks| hooks.each { |hook| ActiveSupport::Notifications.unsubscribe("#{hook}.#{event_group}") } end ActiveSupport::Notifications.subscribe('rolling.live_constant') do |event| SemanticLogger[:live_notifications].warn('new event', event.payload) # FIXME: to be continued... end end