On Wed, May 26, 2010 at 07:48:14AM -0700, Kaspar Schiess wrote: > > Is there an API for logging/tracing every step of process execution? I > would like to either generate nice console output or to keep track of > process status for web display.
Hello Kaspar, have you looked at http://github.com/jmettraux/ruote/blob/ruote2.1/lib/ruote/log/storage_history.rb It's registered in this way http://github.com/jmettraux/ruote/blob/ruote2.1/test/functional/ft_36_storage_history.rb#L23-24 Sorry for the lack of documentation on this one. > I've tried to wrap my head around the services/tracking facilities in > ruote, but cannot seem to make sense of it. Some of the code I am sure > doesn't work (anymore), while the rest just puzzles me. Where should I > look for a working example? Please point me at what doesn't work anymore so that I may fix it quickly (the next person will thank you). > (from ci.rb, doesn't do anything apparently) > engine.add_service(:s_logger, Ruote::TestLogger) > #engine.context[:noisy] = true This logger outputs to STDOUT. Doesn't qualify for web display I guess. engine.context.logger.noisy = true will trigger it. I'd like to fix this ci.rb, where did you find it ? > (from barley.rb, should work but looks ugly to me) > ENGINE.register_participant('trace') do |workitem| > (workitem.fields['trace'] ||= []) << [ > Time.now.strftime('%Y-%m-%d %H:%M:%S'), > workitem.fields['next'], > workitem.fields['task'] ] > end It places some trace/checkpoint information into the workitem itself. I think it doesn't suit your purpose. StorageHistory (top of this email) is probably your best option. If it's not, please tell me and we will figure it out. Best regards, -- John Mettraux - http://jmettraux.wordpress.com -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
