take out request routed
This commit is contained in:
parent
0fa93706a6
commit
d81db97054
2 changed files with 1 additions and 27 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue