cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Glorieux <frederic.glori...@ajlsm.com>
Subject Re: Cocoon read-only (ex: CD-ROM) add ${context-work} parameter to logkit.xconf from CocoonServlet.java
Date Thu, 28 Oct 2004 13:06:18 GMT

> Beside CocoonServlet, there are 4 more places like this: CocoonPortlet, 
> ManagedCocoonPortlet, BeanWrapper, and CocoonTask. And, work directory 
> is available (after my commit) in the context as "work-directory" entry. 
> So, in logkit.xconf you can simply write:

Thanks a lot, it's working like I want, this will be my default. Sorry 
to not yet figure all consequences of one wish.

>     <cocoon id="sitemap">
>       <filename>${work-directory}/logs/sitemap.log</filename>
>       <format type="cocoon">
>         %7.7{priority} %{time}   [%{category}] (%{uri}) 
> %{thread}/%{class:short}: %{message}\n%{throwable}
>       </format>
>       <append>false</append>
>     </cocoon>
> 
> 
> Vadim

I can't figure if it's good for all cocoon community, but reading this

<http://jetty.mortbay.org/jetty/faq?s=250-Configuration&t=tempdir>

For jetty, I just add the directory
{webapp}/WEB-INF/work
and delete ${java.io.tmpdir}/Jetty__{port}__
to have
{webapp}/WEB-INF/work/cocoon-files/logs
If someone wants to keep his work in Temp, deleting 
{webapp}/WEB-INF/work is enough for me.

It's not too different of what is used now ?

For tomcat users, I suppose it's possible to presume some more knowledge 
of server admin, so they will be able to find their work directory ?

----
Another detail, :o(

I'm usually running multiple instances of same cocoon for debug 
(different ports, different servletPath, to test under different 
contexts and initParams). I know how to find my logs in such ways, but 
with the config upper, it may be nice to have something like

{webapp}/WEB-INF/work/{ServletName}_{host}_{port}_{ServletPath}/logs
instead of
{webapp}/WEB-INF/work/cocoon-files/logs


I tried to found a way to get these infos from *CocoonServlet.java* line 
271, but ServletContext and ServletConfig don't seems to expose those 
infos. It's of course a very bad idea to wait for the first request to 
get {host}_{port}_{ServletPath} for a log path, but if more guru than me 
have an idea of a 2 line solution...


-- 
Frédéric Glorieux (ingénieur documentaire, AJLSM)
<http://www.ajlsm.com>

Mime
View raw message