summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/util')
-rw-r--r--lib/puppet/util/log.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb
index 94b0bcffa..6edc7f482 100644
--- a/lib/puppet/util/log.rb
+++ b/lib/puppet/util/log.rb
@@ -475,7 +475,7 @@ class Puppet::Util::Log
@levels.include?(level)
end
- attr_accessor :level, :message, :time, :remote
+ attr_accessor :level, :message, :time, :remote, :file, :line, :version
attr_reader :source
def initialize(args)
@@ -522,6 +522,11 @@ class Puppet::Util::Log
if source.respond_to?(:tags)
source.tags.each { |t| tag(t) }
end
+
+ [:file, :line, :version].each do |param|
+ next unless source.respond_to?(param)
+ send(param.to_s + "=", source.send(param))
+ end
end
def to_report