Skip to content
Extraits de code Groupes Projets
Valider d81db970 rédigé par Raphael's avatar Raphael
Parcourir les fichiers

take out request routed

parent 0fa93706
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -12,11 +12,7 @@ end
class ActionController::LogSubscriber
def start_processing(event)
payload = event.payload
params = payload[:params].except(*INTERNAL_PARAMS)
log_string = "event=request_routed controller=#{payload[:controller]} action=#{payload[:action]} format=#{payload[:formats].first.to_s.upcase} "
log_string << "params='#{params.inspect}'" unless params.empty?
Rails.logger.info(log_string)
#noop
end
def process_action(event)
......
......@@ -32,28 +32,6 @@ describe HomeController do
logger = FakeLogger.new
Rails.stub(:logger).and_return(FakeLogger.new)
end
context 'routing' do
before do
get :show, :lasers => 'green'
@line = Rails.logger.infos.first
end
it 'logs the routing of a request' do
@line.include?('event=request_routed').should be_true
end
it 'logs the controller' do
@line.include?('controller=HomeController').should be_true
end
it 'logs the action' do
@line.include?('action=show').should be_true
end
it 'logs params' do
@line.include?("params='{\"lasers\"=>\"green\"}'").should be_true
end
it 'logs format' do
@line.include?("format=html")
end
end
context 'completion' do
context 'ok' do
before do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter