|
|
@ -3,15 +3,26 @@ module Semantic |
|
|
|
class DevLoader |
|
|
|
def initialize(session_key) |
|
|
|
@session_key = session_key |
|
|
|
|
|
|
|
force_preload_module |
|
|
|
|
|
|
|
once_and_reload do |
|
|
|
append_ansi_formatter |
|
|
|
register_log_subscriber |
|
|
|
end |
|
|
|
|
|
|
|
# FIXME: when final |
|
|
|
# Rails.logger.level = :error |
|
|
|
# FIXME: proper unsubscribe!!! |
|
|
|
RailsSemanticLogger::ActionController::LogSubscriber.logger.level = :fatal |
|
|
|
# RailsSemanticLogger.swap_subscriber( |
|
|
|
# RailsSemanticLogger::ActionController::LogSubscriber, |
|
|
|
# @log_subscriber, # attach missing!!! |
|
|
|
# :action_controller |
|
|
|
# ) |
|
|
|
|
|
|
|
# ActiveSupport::LogSubscriber.subscribers.each do |sub| |
|
|
|
# puts "subscriber #{sub.pattern}" |
|
|
|
# end |
|
|
|
# RailsSemanticLogger.swap_subscriber(RailsSemanticLogger::ActionController::LogSubscriber, |
|
|
|
# @log_subscriber, :action_controller) |
|
|
|
end |
|
|
|
|
|
|
|
private |
|
|
|