diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/type.rb | 5 | ||||
| -rw-r--r-- | lib/puppet/util/log.rb | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index 098d83254..33b4e92da 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -594,6 +594,11 @@ class Type end end + def version + return 0 unless catalog + catalog.version + end + # Meta-parameter methods: These methods deal with the results # of specifying metaparameters 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 |
