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

- old
+ new

@@ -18,14 +18,12 @@ # 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 ::Rails.version >= "2.1" && !::Rails.logger.nil? @@logger = ::Rails.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 @@logger ||= ::Logger.new(STDOUT) @@ -39,6 +37,6 @@ def logger self.class.logger end end -end \ No newline at end of file +end