You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jean Pierre LeJacq <jp...@quoininc.com> on 2004/10/03 17:51:41 UTC
flow: accessing cocoon logger from Java classes
I hae a Java method called from JavaScript Flow that I would like to
instrument with the normal cocoon logging facilities. What is the
best practice for passing the logger from the flow JavaScript to the
Java?
TIA,
--
JP
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: flow: accessing cocoon logger from Java classes
Posted by Sylvain Wallez <sy...@apache.org>.
Jean Pierre LeJacq wrote:
> I hae a Java method called from JavaScript Flow that I would like to
> instrument with the normal cocoon logging facilities. What is the
> best practice for passing the logger from the flow JavaScript to the
> Java?
>
> TIA,
You should make you class implement LogEnabled (or, more conveniently,
extend AbstractLogEnabled), and then instantiate it using
cocoon.createObject(Packages.my.NiceClass).
The various Avalon lifecycle interfaces implemented by the class will be
honoured and the enableLogging() method will be called.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org