commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <nest...@yahoo.com>
Subject Re: [SCXML] enabling/disabling logging for var assignments
Date Mon, 13 Nov 2006 02:40:53 GMT
Hi Rahul,
Sorry to come back that late. My code is again working
so I could follow step by step thru the code in the
SVN and finally I could follow your suggestions, so in
Var#execute() and Assign#execute()after:
ctx.setLocal(name, varObj);

I added:
String varStr = varObj==null?"null":varObj.toString();
appLog.trace( "Var." + name + "=" + varStr );

The question I have now is about how to configure
logging in SCXML. Is it done using a property file?
Just a constant? Of course I could dig into the code
but I guess I'll find out faster with some of your
help.

Thanks,

-Nestor






--- Rahul Akolkar <rahul.akolkar@gmail.com> wrote:

> On 11/1/06, Nestor Urquiza <nestoru@yahoo.com>
> wrote:
> > Hi guys,
> >
> > I am using a custom log library for my Bridge and
> > System layers.
> >
> > When I want to log transitions and onentry/onexit
> > events I can do it thru the SCXMLListener
> > implementation.
> >
> > However for var assignments and evaluations I
> would
> > like to know the easier way to log them.
> >
> > Right now with more than 2000 lines of scxml I
> really
> > need to trace every single assignment within the
> code.
> >
> > Also does anyone know about a plan to build an
> SCXML
> > debugger? Now that I have all the Controller logic
> > written in SCXML I really need that and before
> > writting any code I would like to hear some
> advice.
> >
> <snip/>
> 
> The easiest way would be to add logging statements
> in
> 
> org.apache.commons.scxml.model.Var#execute(...)
> 
> and
> 
> org.apache.commons.scxml.model.Assign#execute(...)
> 
> right at the point where any Context operation --
> such as
> Context#set(...) -- is called. That way, it could
> simply be turned
> on/off with the JCL configuration. Should be useful
> as long as the log
> level is correct (probably, trace would be
> appropriate).
> 
> If you do this for yourself, can you please submit a
> patch (svn diff)?
> 
> -Rahul
> 
> 
> > Thanks,
> >
> > -Nestor
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 
> 



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message