cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Morandini <luca.morandi...@tin.it>
Subject Re: logging from custom transformer
Date Thu, 22 May 2003 08:25:16 GMT
andi wrote:
> 
> in the (sub)sitemap i have declared
> <map:transformer logger="mypackage.MenueTransformer"
> name="menue" src="myPackage.MenueTransformer" />
> 
> what do i have to do to get the logging-messages into
> the logfiles..
> 

Add something like this in the <targets> element of your <cocon 
home>/WEB-INF/logkit.xconf (I use rotating logs, you may dispense with it):

<cocoon id="mypackage">
	<filename>c:/tmp/logs/aims.log</filename>
	<format type="cocoon">
		%7.7{priority} %{time}   [%{category}] (%{uri}) 	 
%{thread}/%{class:short}: %{message}\n%{throwable}
	</format>
	<append>false</append>
	<rotation type="revolving" init="1" max="4">
		<or>
			<size>1m</size>
			<time>8:00:00</time>
		</or>
	</rotation>
</cocoon>


Then add this in the <categories> element of the same file:
<category name="mypackage" log-level="DEBUG">
	<log-target id-ref="mypackage"/>
</category>

It should work.

Regards,

------------------------------------------
                Luca Morandini
                GIS Consultant
               lmorandini@ieee.org
http://space.virgilio.it/kumora/index.html
------------------------------------------



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


Mime
View raw message