You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
580 B
18 lines
580 B
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
|