RailsSemanticLogger::Rack::Logger.logger.level = :info # useful for remaining log like "[Rack::Log] Started..." SemanticLogger.clear_appenders! im = nil # Zeitwerk reload message Rails.autoloaders.main.on_load('ApplicationController') do SemanticLogger[:zeitwerk].debug('reload!') im = Semantic::InstrumentationManager.new end Rails.configuration.after_initialize do Semantic::InstrumentationManager.clear ActiveSupport::Notifications.subscribe('rolling.live_constant') do |event| im.process(event.payload[:changes]) rescue StandardError => e puts e end end