lib/loggable/log_methods.rb in mediashelf-loggable-0.4.5 vs lib/loggable/log_methods.rb in mediashelf-loggable-0.4.6

- old
+ new

@@ -17,13 +17,13 @@ # If ::Rails.logger is defined, that will be returned. # If no logger has been defined, a new STDOUT Logger will be created. def logger - if defined?(::Rails) && Rails.respond_to?(:version) - if Rails.version >= "3.0" && defined?(::Rails::Application) && !::Rails.logger.nil? + if defined?(::Rails) && ::Rails.respond_to?(:version) + if ::Rails.version >= "3.0" && defined?(::Rails::Application) && !::Rails.logger.nil? @@logger = ::Rails.logger - elsif defined?(RAILS_DEFAULT_LOGGER) + elsif ::Rails.version < "3.0" @@logger = RAILS_DEFAULT_LOGGER end end # If none of the above was able to set @@logger, create a new default logger \ No newline at end of file