lib/takosan.rb in takosan-1.1.0 vs lib/takosan.rb in takosan-1.2.0
- old
+ new
@@ -34,8 +34,13 @@
logger.warn("#{e.class} #{e.message}")
end
end
def logger
- @@_logger ||= Rails.logger
+ @@_logger ||=
+ if defined?(Rails.logger)
+ Rails.logger
+ else
+ Logger.new($stderr)
+ end
end
end