You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ma...@student.uni-ulm.de on 2004/02/16 14:45:12 UTC

Problem: No Logging for my custom generator?!?

Hi,
I wrote a custom Generator "persistence.ViewGenerator" It extends the 
AbstractGenerator (with the Interface LoggingEnabled).
In the method generate() I wrote that following code:
..
if (getLogger().isDebugEnabled()) {
this.getLogger().debug("Generating View");}
..

In the logkit.xconf I defined an own target by copy-paste and by renaming the 
"cocoon"-target:
..
<cocoon id="mediathek">
            <filename>${context-root}/WEB-INF/logs/mediathek.log</filename>
            <format type="cocoon"> %7.7{priority} %{time} [%{category}] 
(%{uri})
                %{thread}/%{class:short}: %{message}\n%{throwable} </format>
            <append>false</append>
</cocoon>
..

Now, I defined an own target in logkit.xconf:
<category log-level="DEBUG" name="mediathek">
        <log-target id-ref="mediathek"/>
</category>

In the according sitemap - where the generator is used - I made the following 
entry:
<map:generator pool-max="100" pool-min="20" pool-grow="10" name="view" 
logger="mediathek" src="persistence.ViewGenerator"/>

The component itself is used and works well. The log-file mediathek is 
generated but has no entries.. (?!?)
Has anyone an idea?
Thanks in advance,
Mathias Wiegard

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


Re: Problem: No Logging for my custom generator?!?

Posted by Joerg Heinicke <jo...@gmx.de>.
On 16.02.2004 14:45, mathias.wiegard@student.uni-ulm.de wrote:

> Hi,
> I wrote a custom Generator "persistence.ViewGenerator" It extends the 
> AbstractGenerator (with the Interface LoggingEnabled).
> In the method generate() I wrote that following code:
> ..
> if (getLogger().isDebugEnabled()) {
> this.getLogger().debug("Generating View");}
> ..
> 
> In the logkit.xconf I defined an own target by copy-paste and by renaming the 
> "cocoon"-target:
> ..
> <cocoon id="mediathek">
>             <filename>${context-root}/WEB-INF/logs/mediathek.log</filename>
>             <format type="cocoon"> %7.7{priority} %{time} [%{category}] 
> (%{uri})
>                 %{thread}/%{class:short}: %{message}\n%{throwable} </format>
>             <append>false</append>
> </cocoon>
> ..
> 
> Now, I defined an own target in logkit.xconf:
> <category log-level="DEBUG" name="mediathek">
>         <log-target id-ref="mediathek"/>
> </category>
> 
> In the according sitemap - where the generator is used - I made the following 
> entry:
> <map:generator pool-max="100" pool-min="20" pool-grow="10" name="view" 
> logger="mediathek" src="persistence.ViewGenerator"/>

Could it be that the logging output goes to sitemap.log? I remember an 
issue that the value of @logger was prefixed with "sitemap.", but I 
don't remember how it was solved finally. Would be interesting if the 
logging works out all - at least I expect, you would probably get 
exceptions otherwise.

Joerg

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