diff --git a/config/environment.rb b/config/environment.rb index fd396c95..bc3ac725 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -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 diff --git a/config/environments/development.rb b/config/environments/development.rb index 09020254..61ce9fec 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -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 diff --git a/config/environments/test.rb b/config/environments/test.rb index c41af37f..ece6e9cf 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -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 diff --git a/script/server b/script/server index 2d1112a8..0da05085 100755 --- a/script/server +++ b/script/server @@ -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