incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger" <>
Subject Re: debug a PE
Date Tue, 24 Jan 2012 10:01:06 GMT
Yes, I notice that log4j jar file in s4 repo and added it to my app.
It works.
Thanks for you reply!


------------------ Original ------------------
From:  "Matthieu Morel"<>;
Date:  Tue, Jan 24, 2012 05:40 PM
To:  "s4-user"<>; 

Subject:  Re: debug a PE

On 1/24/12 10:07 AM, Roger wrote:
> Hi all,
> I am debugging a PE, in its processEvent method.
> But I can find no way to print out the objects during runtime.
> I tried to use log, but AbstractPE seems having no log object.
> And I tried to redirect standard output, 1>>
> But S4 process did not end, although its thread is ended. So the output
> would not be dumped.
> Is there any easy way to debug a PE? (I donot want to ouputstream into
> my disk, this would have side-effects on performance)

If you want to log state or events, you can define your own logger as 
well as a custom appender.  S4 0.3. uses log4j, which has extensive 
documentation and examples on how to do that. You may use any other 
system as well.

Also, note that debugging necessarily has an impact on the execution of 
a system... but you may not need to log everything every time.

Hope this helps,

View raw message