module Dry::Core::Deprecations

def warn(msg, tag: nil, uplevel: nil)

Parameters:
  • Caller (Integer) -- frame to add to the message
  • tag (String) -- Tag to help identify the source of the warning.
  • msg (String) -- Warning string
def warn(msg, tag: nil, uplevel: nil)
  caller_info = uplevel.nil? ? nil : caller[uplevel]
  tag = "[#{tag || "deprecated"}]"
  hint = msg.gsub(/^\s+/, "")
  logger.warn(
    [caller_info, tag, hint].compact.join(" ")
  )
end