summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorEric Putnam <putnam.eric@gmail.com>2016-09-06 08:24:07 -0700
committerGitHub <noreply@github.com>2016-09-06 08:24:07 -0700
commitd350ee49ee318353e9aa596c254ffbc40eba5b8d (patch)
treed761e27d94bc48c6b55e1bbb2d95805be21cfe5f /lib/puppet/parser/functions
parent8da9579f34ea851da9d484fbe87436787a6e19bb (diff)
parentb63862ff43194194f7428739a32cfe13bad1e7ed (diff)
Merge pull request #651 from HelenCampbell/deprecationUpdate
Addition of logging with file and line numbers
Diffstat (limited to 'lib/puppet/parser/functions')
-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