You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sébastien Geindre <se...@meteo.fr> on 2008/02/14 18:27:12 UTC

How to log/trace functional information ??

hi all,

I'd like to make functional log.

I explain.
A client send xml data.
I need to put it in kind of database.
This is ok.

But i would like to write in a file (for example) that client A send 
this datas, this day,...
All information i need to trace are in  the xml data sent.

A kind of monitoring, or functional trace.

How can i do that with C2.2 ?


Thanks for your advices.

Sébastien.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: How to log/trace functional information ??

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Andy Stevens pisze:
> On 14/02/2008, Sébastien Geindre <se...@meteo.fr> wrote:
>>  A client send xml data.
>>  I need to put it in kind of database.
>>  This is ok.
>>
>>  But i would like to write in a file (for example) that client A send
>>  this datas, this day,...
>>  All information i need to trace are in  the xml data sent.
>>
>>  A kind of monitoring, or functional trace.
>>
>>  How can i do that with C2.2 ?
> 
> Are you passing the user's document through a sitemap pipeline?  If
> so, you could include a custom transformer that passes everything
> through unchanged, but watches for the values you're interested in and
> records them.  Then in the endDocument callback, write them to the log
> file.  Don't see any reason why 2.2 would be any different from 2.1
> with this approach, asides from component lifecycle code.

There is already a transformer that can dump whole content of XML that is going through. It's called
TeeTransformer.

-- 
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: How to log/trace functional information ??

Posted by Andy Stevens <in...@googlemail.com>.
On 14/02/2008, Sébastien Geindre <se...@meteo.fr> wrote:
>  A client send xml data.
>  I need to put it in kind of database.
>  This is ok.
>
>  But i would like to write in a file (for example) that client A send
>  this datas, this day,...
>  All information i need to trace are in  the xml data sent.
>
>  A kind of monitoring, or functional trace.
>
>  How can i do that with C2.2 ?

Are you passing the user's document through a sitemap pipeline?  If
so, you could include a custom transformer that passes everything
through unchanged, but watches for the values you're interested in and
records them.  Then in the endDocument callback, write them to the log
file.  Don't see any reason why 2.2 would be any different from 2.1
with this approach, asides from component lifecycle code.


Andrew.
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku application

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org