You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ferdinand Soethe <fe...@apache.org> on 2005/12/28 17:42:14 UTC

New Coocon Debugging Feature

Talking to Carsten Ziegeler at Apachecon I learned that there is a
new yet undocumented debugging feature in Cocoon. To use it he wrote

(my translation)

> for the simple Cocoon debugger you need the Cocoon Profiler Block
> (Cocoon 2.2) and then you have to add the following line into XConf:

> <component role="org.apache.cocoon.sitemap.SitemapExecutor"
>    class="org.apache.cocoon.profiler.debugging.SimpleSitemapExecutor"/>

> After that you should see the debugging output in the console window.

Can anybody tell me how to configure 'our' Cocoon that way. According to
Carsten this debugger will give you a true log of Cocoon's processing of
sitemaps and I'd really like to have that.

--
Ferdinand Soethe


Re: New Coocon Debugging Feature

Posted by David Crossley <cr...@apache.org>.
Carsten Ziegeler wrote:
> Ferdinand Soethe wrote:
> > 
> > Yep, that's all Carsten told me to do. Will contact him again to find
> > out more.
>
> I'm monitoring this list and watch out for all mails containing my name :)

Wow, thanks. We will be sure to only ring the Carsten-bell
when really needed :-)

-David

Re: New Coocon Debugging Feature

Posted by David Crossley <cr...@apache.org>.
Thanks. We already had a debug.log configured for that.
Now i know why it was never being used.

So today i added default configuration to our xconf
(off by default).

-David

Carsten Ziegeler wrote:
> Ok, actually I was wrong - but only partially :)
> 
> The debugger works as described, but it does not output to the console
> but to the logger - I don't know the logging configuration for Forrest,
> but with standard Cocoon you get the output in the core.log - all
> messages are logged with the level INFO.
> So, you can define a debug log category in your logging configuration
> and then use this for the debugger, for example:
> 
> <component role="org.apache.cocoon.sitemap.SitemapExecutor"
> class="org.apache.cocoon.profiler.debugging.SimpleSitemapExecutor"
> logger="debugger"/>
> 
> and then you can get all the debugging messages in a separate log file.
> 
> HTH
> Carsten

Re: New Coocon Debugging Feature

Posted by Carsten Ziegeler <cz...@apache.org>.
Ok, actually I was wrong - but only partially :)

The debugger works as described, but it does not output to the console
but to the logger - I don't know the logging configuration for Forrest,
but with standard Cocoon you get the output in the core.log - all
messages are logged with the level INFO.
So, you can define a debug log category in your logging configuration
and then use this for the debugger, for example:

<component role="org.apache.cocoon.sitemap.SitemapExecutor"
class="org.apache.cocoon.profiler.debugging.SimpleSitemapExecutor"
logger="debugger"/>

and then you can get all the debugging messages in a separate log file.

HTH
Carsten

Carsten Ziegeler schrieb:
> Ferdinand Soethe wrote:
> 
>>Ross Gardler wrote:
>>
>>
>>
>>>Are you sure this is all there is to it, don't you need to turn on the
>>>profiler in the sitemap?
>>
>>
>>Yep, that's all Carsten told me to do. Will contact him again to find
>>out more.
> 
> I'm monitoring this list and watch out for all mails containing my name :)
> 
> This should be everything..I'm currently in the process to try it out with
> the current Cocoon version and will report back.
> 
> Carsten
> 


-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: New Coocon Debugging Feature

Posted by Carsten Ziegeler <cz...@apache.org>.
Ferdinand Soethe wrote:
> 
> Ross Gardler wrote:
> 
> 
>>Are you sure this is all there is to it, don't you need to turn on the
>>profiler in the sitemap?
> 
> 
> Yep, that's all Carsten told me to do. Will contact him again to find
> out more.
I'm monitoring this list and watch out for all mails containing my name :)
> 
This should be everything..I'm currently in the process to try it out with
the current Cocoon version and will report back.

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: New Coocon Debugging Feature

Posted by Ferdinand Soethe <fe...@apache.org>.





Ross Gardler wrote:

> Are you sure this is all there is to it, don't you need to turn on the
> profiler in the sitemap?

Yep, that's all Carsten told me to do. Will contact him again to find
out more.

> Will you be putting the presentation online?

Sure no problem. Though contentwise it is only a simplified version
of our presentation in Stuttgart now presented in slidy. Where do you
suggest I should put it?

--
Ferdinand Soethe


Re: New Coocon Debugging Feature

Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> Ross Gardler wrote:
> 
> 
>>Add the relevant snippet to
>>FORREST_HOME/main/webapp/WEB-INF/forrest.xconf

Sorry I did it from memory and got it wrong. You worked it out though I see:

> Hmm. I checked both .7 and head and found only cocoon.xconf in this
> directory. Since that only includes the file xconf/forrest-core.xconf,
> I tried adding the snippet there:
> 
> <!--+
>     |  This is the Apache Cocoon configuration file. This is the place
>     |  where you configure the components that Cocoon uses internally (stuff
>     |  like the cache) or handles to the pipeline components
>     |  (stuff like XML parsers or XSLT processors).
>     +-->
> 
>     <component role="org.apache.cocoon.sitemap.SitemapExecutor" class="org.apache.cocoon.profiler.debugging.SimpleSitemapExecutor"/>
>     
> <!--+
>     | cocoon-template and cocoon-template-expression block
>     | config - start
>     +-->
> 
> Then I seeded a new Forrest, ran Jetty and browsed the site.
> Unfortunately I see no debug-messages on the Jetty console. Am I
> missing something?

No. I've verified that the class is included in our profiler block.

Are you sure this is all there is to it, don't you need to turn on the 
profiler in the sitemap?

>>[OT] How did your talk go?
> 
> 
>         I think it went very well. A lot more people from outside of Apache
>         and a very interested audience that asked many questions.

Cool, well done.

Will you be putting the presentation online?

Ross

Re: New Coocon Debugging Feature

Posted by Ferdinand Soethe <fe...@apache.org>.
Ross Gardler wrote:

> Add the relevant snippet to
> FORREST_HOME/main/webapp/WEB-INF/forrest.xconf

Hmm. I checked both .7 and head and found only cocoon.xconf in this
directory. Since that only includes the file xconf/forrest-core.xconf,
I tried adding the snippet there:

<!--+
    |  This is the Apache Cocoon configuration file. This is the place
    |  where you configure the components that Cocoon uses internally (stuff
    |  like the cache) or handles to the pipeline components
    |  (stuff like XML parsers or XSLT processors).
    +-->

    <component role="org.apache.cocoon.sitemap.SitemapExecutor" class="org.apache.cocoon.profiler.debugging.SimpleSitemapExecutor"/>
    
<!--+
    | cocoon-template and cocoon-template-expression block
    | config - start
    +-->

Then I seeded a new Forrest, ran Jetty and browsed the site.
Unfortunately I see no debug-messages on the Jetty console. Am I
missing something?
    
> Please add it (commented out) along with a brief description to the file
> in SVN, that sounds really useful.

Will do once we get it working.

> [OT] How did your talk go?

        I think it went very well. A lot more people from outside of Apache
        and a very interested audience that asked many questions.

Regards,
Ferdinand Soethe




--
Ferdinand Soethe


Re: New Coocon Debugging Feature

Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> Talking to Carsten Ziegeler at Apachecon I learned that there is a
> new yet undocumented debugging feature in Cocoon. To use it he wrote
> 
> (my translation)
> 
> 
>>for the simple Cocoon debugger you need the Cocoon Profiler Block
>>(Cocoon 2.2) and then you have to add the following line into XConf:
> 
> 
>><component role="org.apache.cocoon.sitemap.SitemapExecutor"
>>   class="org.apache.cocoon.profiler.debugging.SimpleSitemapExecutor"/>
> 
> 
>>After that you should see the debugging output in the console window.
> 
> 
> Can anybody tell me how to configure 'our' Cocoon that way. According to
> Carsten this debugger will give you a true log of Cocoon's processing of
> sitemaps and I'd really like to have that.

Add the relevant snippet to FORREST_HOME/main/webapp/WEB-INF/forrest.xconf

Please add it (commented out) along with a brief description to the file 
in SVN, that sounds really useful.

[OT] How did your talk go?

Ross