lib/locomotive/builder/server/middleware.rb in locomotivecms_builder-1.0.0.alpha2 vs lib/locomotive/builder/server/middleware.rb in locomotivecms_builder-1.0.0.alpha3

- old
+ new

@@ -42,11 +42,16 @@ def json? self.request.content_type == 'application/json' || File.extname(self.request.path) == '.json' end - def redirect_to(location) - [301, { 'Content-Type' => 'text/html', 'Location' => location }, []] + def redirect_to(location, type = 301) + self.log "Redirected to #{location}" + [type, { 'Content-Type' => 'text/html', 'Location' => location }, []] + end + + def log(msg) + Locomotive::Builder::Logger.info msg end end end \ No newline at end of file