add logging option in Locomotive settings
This commit is contained in:
parent
fe96fbdaa2
commit
1d5786638b
@ -4,4 +4,5 @@ require File.dirname(__FILE__) + '/../../lib/core_ext.rb'
|
|||||||
Locomotive.configure do |config|
|
Locomotive.configure do |config|
|
||||||
config.default_domain = 'example.com'
|
config.default_domain = 'example.com'
|
||||||
config.lastest_items_nb = 5
|
config.lastest_items_nb = 5
|
||||||
|
config.enable_logs = true
|
||||||
end
|
end
|
@ -8,7 +8,8 @@ module Locomotive
|
|||||||
# :forbidden_paths => %w{layouts snippets stylesheets javascripts assets admin system api},
|
# :forbidden_paths => %w{layouts snippets stylesheets javascripts assets admin system api},
|
||||||
:reserved_slugs => %w{stylesheets javascripts assets admin images api pages},
|
:reserved_slugs => %w{stylesheets javascripts assets admin images api pages},
|
||||||
:locales => %w{en fr},
|
:locales => %w{en fr},
|
||||||
:cookie_key => '_locomotive_session'
|
:cookie_key => '_locomotive_session',
|
||||||
|
:enable_logs => false
|
||||||
}
|
}
|
||||||
|
|
||||||
cattr_accessor :settings
|
cattr_accessor :settings
|
||||||
|
@ -19,6 +19,7 @@ module Locomotive
|
|||||||
protected
|
protected
|
||||||
|
|
||||||
def fetch_site
|
def fetch_site
|
||||||
|
logger.info "[fetch site] host = #{request.host} / #{request.env['HTTP_HOST']}" if Locomotive.config.enable_logs
|
||||||
@current_site ||= Site.match_domain(request.host).first
|
@current_site ||= Site.match_domain(request.host).first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user