Corrected switching on of the debug logging in test and dev environments
This commit is contained in:
parent
b432bbd3ae
commit
f1c5004543
4 changed files with 4 additions and 4 deletions
|
@ -62,7 +62,7 @@ require_dependency "environments/#{RAILS_ENV}"
|
|||
unless defined? RAILS_DEFAULT_LOGGER
|
||||
RAILS_DEFAULT_LOGGER = Logger.new(STDERR)
|
||||
ActionController::Base.logger ||= RAILS_DEFAULT_LOGGER
|
||||
if defined? INSTIKI_DEBUG_LOG and INSTIKI_DEBUG_LOG
|
||||
if $instiki_debug_logging
|
||||
RAILS_DEFAULT_LOGGER.level = Logger::DEBUG
|
||||
ActionController::Base.logger.level = Logger::DEBUG
|
||||
else
|
||||
|
|
|
@ -2,4 +2,4 @@ Dependencies.mechanism = :require
|
|||
ActionController::Base.consider_all_requests_local = true
|
||||
ActionController::Base.perform_caching = false
|
||||
BREAKPOINT_SERVER_PORT = 42531
|
||||
INSTIKI_DEBUG_LOG = true unless defined? INSTIKI_DEBUG_LOG
|
||||
$instiki_debug_logging = true
|
||||
|
|
|
@ -11,7 +11,7 @@ unless defined? TEST_LOGGER
|
|||
$stderr.puts "To see the Rails log:\n less #{log_name}"
|
||||
|
||||
TEST_LOGGER = ActionController::Base.logger = Logger.new(log_name)
|
||||
INSTIKI_DEBUG_LOG = true unless defined? INSTIKI_DEBUG_LOG
|
||||
$instiki_debug_logging = true
|
||||
|
||||
WikiService.storage_path = RAILS_ROOT + '/storage/test/'
|
||||
end
|
||||
|
|
|
@ -64,7 +64,7 @@ end
|
|||
FileUtils.mkdir_p(storage_path)
|
||||
|
||||
ENV['RAILS_ENV'] = OPTIONS[:environment]
|
||||
INSTIKI_DEBUG_LOG = OPTIONS[:verbose]
|
||||
$instiki_debug_logging = OPTIONS[:verbose]
|
||||
require File.expand_path(File.dirname(__FILE__) + '/../config/environment')
|
||||
WikiService.storage_path = storage_path
|
||||
|
||||
|
|
Loading…
Reference in a new issue