summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/deprecation.rb
diff options
context:
space:
mode:
authorHelen Campbell <helen@puppetlabs.com>2016-09-06 15:00:07 +0100
committerHelen Campbell <helen@puppetlabs.com>2016-09-06 15:15:29 +0100
commitb63862ff43194194f7428739a32cfe13bad1e7ed (patch)
tree718e8f1e6cf3ed846af73a81bf8b6d3226e59842 /lib/puppet/parser/functions/deprecation.rb
parentb2d05e9b3f5da65ad3dc39b95b342e9085e52346 (diff)
Addition of logging with file and line numbers
Diffstat (limited to 'lib/puppet/parser/functions/deprecation.rb')
-rw-r--r--lib/puppet/parser/functions/deprecation.rb4
1 files changed, 3 insertions, 1 deletions
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