ncbo/bioportal_web_ui

View on GitHub
lib/log.rb

Summary

Maintainability
A
0 mins
Test Coverage
# Log using local methods
# Local: provide the log level as a symbol (:debug, :info, :error, etc)

class LOG
  def self.add(level, message)

    if defined? Rails.logger
      Rails.logger.send(level, message)
    else
      p "#{level} || #{message}"
    end
  end
end