lib/mongrel2/config/route.rb in mongrel2-0.42.0 vs lib/mongrel2/config/route.rb in mongrel2-0.43.0
- old
+ new
@@ -3,11 +3,14 @@
require 'mongrel2' unless defined?( Mongrel2 )
require 'mongrel2/config' unless defined?( Mongrel2::Config )
# Mongrel2 Route configuration class
class Mongrel2::Config::Route < Mongrel2::Config( :route )
+ extend Loggability
+ log_to :mongrel2
+
### As of Mongrel2/1.8.0:
# CREATE TABLE route (id INTEGER PRIMARY KEY,
# path TEXT,
# reversed BOOLEAN DEFAULT 0,
# host_id INTEGER,
@@ -16,9 +19,11 @@
### Return the Route that corresponds to the given +request+.
def self::for_request( request )
pattern = request.headers.pattern
+ self.log.debug "Searching for the route for the path %p in %p" %
+ [ pattern, self.all ]
return self.filter( path: pattern ).first
end
#