diff --git a/lib/fog/deprecation.rb b/lib/fog/deprecation.rb index e60956f2b..38ad3b9f9 100644 --- a/lib/fog/deprecation.rb +++ b/lib/fog/deprecation.rb @@ -4,7 +4,10 @@ module Fog def deprecate(older, newer) class_eval <<-EOS, __FILE__, __LINE__ def #{older}(*args) - Formatador.display_line("[yellow][WARN] #{self} => ##{older} is deprecated, use ##{newer} instead[/]") + location = caller.first + warning = "[yellow][WARN] #{self} => ##{older} is deprecated, use ##{newer} instead[/]" + warning << " [light_black](" << location << ")[/] " + Formatador.display_line(warning) #{newer}(*args) end EOS