diff options
author | Luke Kanies <luke@madstop.com> | 2009-07-24 00:27:44 -0700 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-08-01 12:50:42 -0700 |
commit | ac58e274c409b69073e304a8355bbe4ccb37350a (patch) | |
tree | b256ad839bcc4c75a34af0260cb7ff5c18625748 /lib/puppet/util/log.rb | |
parent | 6ed01037ad8b6d8d5ff7158ef6e09c785ed8b9fe (diff) | |
download | puppet-ac58e274c409b69073e304a8355bbe4ccb37350a.tar.gz puppet-ac58e274c409b69073e304a8355bbe4ccb37350a.tar.xz puppet-ac58e274c409b69073e304a8355bbe4ccb37350a.zip |
Configuration version information is now in logs
The log instances have file, line, and config version
information, although it's not currently printed.
It's available in the reports, and you can strip it
out with your own processors.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/util/log.rb')
-rw-r--r-- | lib/puppet/util/log.rb | 7 |
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 |