From b63862ff43194194f7428739a32cfe13bad1e7ed Mon Sep 17 00:00:00 2001 From: Helen Campbell Date: Tue, 6 Sep 2016 15:00:07 +0100 Subject: Addition of logging with file and line numbers --- lib/puppet/parser/functions/deprecation.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/puppet/parser/functions') diff --git a/lib/puppet/parser/functions/deprecation.rb b/lib/puppet/parser/functions/deprecation.rb index e30f3a0..0cb247d 100644 --- a/lib/puppet/parser/functions/deprecation.rb +++ b/lib/puppet/parser/functions/deprecation.rb @@ -11,7 +11,9 @@ EOS message = arguments[1] if ENV['STDLIB_LOG_DEPRECATIONS'] == "true" - warning("deprecation. #{key}. #{message}") + caller_infos = caller.first.split(":") + err_message = "#{message} : #{caller_infos[0]} : #{caller_infos[1]}" + warning("deprecation. #{key}. #{err_message}") end end end -- cgit v1.2.3