summaryrefslogtreecommitdiff
path: root/lib/chef/formatters/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/formatters/base.rb')
-rw-r--r--lib/chef/formatters/base.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/chef/formatters/base.rb b/lib/chef/formatters/base.rb
index 536bf72e02..2fbe00862c 100644
--- a/lib/chef/formatters/base.rb
+++ b/lib/chef/formatters/base.rb
@@ -213,7 +213,17 @@ class Chef
end
def deprecation(message, location = caller(2..2)[0])
- Chef::Log.deprecation("#{message} at #{location}")
+ out = if is_structured_deprecation?(message)
+ message.inspect
+ else
+ "#{message} at #{location}"
+ end
+
+ Chef::Log.deprecation(out)
+ end
+
+ def is_structured_deprecation?(deprecation)
+ deprecation.kind_of?(Chef::Deprecated::Base)
end
def is_formatter?