Sha256: c74bfc7c42b676b1fc15cffa87e984a424e43a97cfb2efa517212c80acdf4726
Contents?: true
Size: 1.39 KB
Versions: 205
Compression:
Stored size: 1.39 KB
Contents
module Origen module LoggerMethods extend ActiveSupport::Concern included do |klass| Origen.deprecate <<-END The LoggerMethods module is deprecated, use Origen.log instead (or just log from within a class that includes Origen::Model). See here for the new API: http://origen.freescale.net/origen/latest/guides/utilities/logger/ Called from the #{klass} class. END end def log @log ||= Origen.log end def lputs(*args) Origen.log.lputs(*args) end alias_method :lprint, :lputs def warn(*args) options = args.last.is_a?(Hash) ? args.pop : {} args.each { |arg| Origen.log.warn arg } end alias_method :warning, :warn def error(*args) options = args.last.is_a?(Hash) ? args.pop : {} args.each { |arg| Origen.log.error arg } end def alert(*args) options = args.last.is_a?(Hash) ? args.pop : {} args.each { |arg| Origen.log.warn arg } end def deprecated(*lines) options = lines.last.is_a?(Hash) ? lines.pop : {} lines.flatten.each do |line| line.split(/\n/).each do |line| Origen.log.deprecate line end end end def highlight lputs '' lputs '######################################################################' yield lputs '######################################################################' lputs '' end end end
Version data entries
205 entries across 205 versions & 1 rubygems