lib/shogun/dispatch.rb in shogun-3.0.0 vs lib/shogun/dispatch.rb in shogun-3.1.0
- old
+ new
@@ -35,10 +35,18 @@
route = lookup.to_route
control = route.control.new(payload: payload)
- control.to_a
+ @logger.debug(self.class) do
+ "Request `#{lookup.request}` handled by `#{route.control}`"
+ end
+
+ control.to_a.tap do |response|
+ @logger.debug(self.class) do
+ "Response `#{response[0]}` with `#{response[2]}`"
+ end
+ end
end
def push(route:)
routes[route.as_key] = route
end