diff options
author | Helen Campbell <helen@puppetlabs.com> | 2016-09-06 15:00:07 +0100 |
---|---|---|
committer | Helen Campbell <helen@puppetlabs.com> | 2016-09-06 15:15:29 +0100 |
commit | b63862ff43194194f7428739a32cfe13bad1e7ed (patch) | |
tree | 718e8f1e6cf3ed846af73a81bf8b6d3226e59842 /lib/puppet/parser | |
parent | b2d05e9b3f5da65ad3dc39b95b342e9085e52346 (diff) |
Addition of logging with file and line numbers
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/deprecation.rb | 4 |
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 |