diff options
| author | Luke Kanies <luke@madstop.com> | 2005-08-04 18:54:47 +0000 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2005-08-04 18:54:47 +0000 |
| commit | 77e1cf050e8a4cf82925d3d86cc4dc2cd8f4ea58 (patch) | |
| tree | 9dce240f1fe61532c5724da9ba85b6bf7aa5c44f /lib | |
| parent | 9c7c71ccd8631c0dce65e91380704338a9dab219 (diff) | |
| download | puppet-77e1cf050e8a4cf82925d3d86cc4dc2cd8f4ea58.tar.gz puppet-77e1cf050e8a4cf82925d3d86cc4dc2cd8f4ea58.tar.xz puppet-77e1cf050e8a4cf82925d3d86cc4dc2cd8f4ea58.zip | |
fixing verbose output to be better and easier to manage
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@499 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/event.rb | 10 | ||||
| -rw-r--r-- | lib/puppet/statechange.rb | 15 |
2 files changed, 15 insertions, 10 deletions
diff --git a/lib/puppet/event.rb b/lib/puppet/event.rb index cb120bc28..86893f6d1 100644 --- a/lib/puppet/event.rb +++ b/lib/puppet/event.rb @@ -103,18 +103,18 @@ module Puppet end def initialize(args) - unless args.include?(:event) and args.include?(:object) + unless args.include?(:event) and args.include?(:change) raise "Event.new called incorrectly" end - @state = args[:state] + @change = args[:change] @event = args[:event] - @object = args[:object] + #@object = args[:object] @transaction = args[:transaction] #Puppet.info "%s: %s(%s)" % - Puppet.info "%s: %s changed from %s to %s" % - [@object,@state.name, @state.is,@state.should] + #Puppet.info "%s: %s changed from %s to %s" % + # [@object,@state.name, @state.is,@state.should] # initially, just stuff all instances into a central bucket # to be handled as a batch diff --git a/lib/puppet/statechange.rb b/lib/puppet/statechange.rb index 3aca38a39..257558513 100644 --- a/lib/puppet/statechange.rb +++ b/lib/puppet/statechange.rb @@ -58,10 +58,12 @@ module Puppet # i should maybe include object type, but the event type # should basically point to that, right? + #:state => @state, + #:object => @state.parent, + Puppet.info self.to_s return Puppet::Event.new( :event => event, - :state => @state, - :object => @state.parent, + :change => self, :transaction => @transaction, :message => self.to_s ) @@ -74,10 +76,12 @@ module Puppet #if pname.is_a?(Symbol) # pname = pname.id2name #end + #:state => @state, + #:object => @state.parent, + Puppet.info "Failed: " + self.to_s return Puppet::Event.new( :event => pname + "_failed", - :state => @state, - :object => @state.parent, + :change => self, :transaction => @transaction, :message => "Failed: " + self.to_s ) @@ -121,7 +125,8 @@ module Puppet #--------------------------------------------------------------- def to_s - return "%s: %s => %s" % [@state,@is,@should] + return "%s: %s changed %s to %s" % + [@state.parent, @state.name, @is, @should] end #--------------------------------------------------------------- end |
