[kepler-users] logging actor

Ford, Mark mark.ford at ll.mit.edu
Wed Apr 29 06:51:29 PDT 2009


There's a Logging actor which accepts StringToken inputs. This assumes that the actors you connect to it have ports which produce meaningful logging info. With this actor you'd wire whatever actors you wanted to log into the Logging actor and it would record their log statements to a file. The contents of this file could always be displayed in a window as suggested in another post.

The drawback here is that the actors that connect to the logger are required to have a port that outputs meaningful logging. I don't know if this is necessarily the case with existing actors. If you're creating actors from scratch then you could design them with this additional port in mind.

Your suggestion of capturing standard out is possible as well. You could simply place an actor on the canvas which T'd System.out to the existing printstream plus your own display. This has its drawbacks as well since you might end up with lots of junk in the display or inconsistent formats.

Another option would be to use the standard Java logging or an equivalent (log4j or commons logging) within the actors. Again, this assumes that you're writing your own actors. Each actor would produce info, debug, warning, error, or trace log statements using the standard API. The logging API's allow you to configure the handler chains for logging dynamically so a special logging actor could inject itself into the chain and thereby capture the log records and format them accordingly to its own display.

I like the idea of having a logging port on each actor but I'd like the output to be structured so the consumer of the log info would be able to make some decisions about handling it. This would also make the logging very explicit since you'd be able to see the connections in the workflow and know which actors were contributing to the log. This may have its own problems if you have large workflows since you may end up with links all over the place.


On 4/28/09 4:26 PM, "Chris Weed" <chrisweed at gmail.com> wrote:

Hi,
I would like to use an actor that will capture all of the logging from
various actors and output these to a display.
For example, it could capture everything sent to "standard out", and
pipe this to a display.
Another option would be that it holds a logging singleton and all of
the other actors will write log messages to this singleton.

Has anyone done this before.
Chris
_______________________________________________
Kepler-users mailing list
Kepler-users at kepler-project.org
http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users




--
Mark Ford
MIT Lincoln Laboratory
244 Wood Street
Lexington MA 02420
(781) 981-1843
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20090429/66da0516/attachment.html>


More information about the Kepler-users mailing list