diff options
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r-- | lib/puppet/parser/functions/deprecation.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/deprecation.rb b/lib/puppet/parser/functions/deprecation.rb index fc861a6..0cb247d 100644 --- a/lib/puppet/parser/functions/deprecation.rb +++ b/lib/puppet/parser/functions/deprecation.rb @@ -9,7 +9,11 @@ EOS key = arguments[0] message = arguments[1] - - warning("deprecation. #{key}. #{message}") + + if ENV['STDLIB_LOG_DEPRECATIONS'] == "true" + caller_infos = caller.first.split(":") + err_message = "#{message} : #{caller_infos[0]} : #{caller_infos[1]}" + warning("deprecation. #{key}. #{err_message}") + end end end |