cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santoso, Tommy" <Tommy.Sant...@Dresdner-Bank.com>
Subject Overwriting default log path
Date Wed, 16 May 2001 11:38:50 GMT
Hi Developer team,

Hope everything goes well,

It's about log-dir for xml-cocoon2:

At moment we couldn't overwrite the default xml-cocoon2 log dir on context
path,

and just absolute path overwriting is supported, 

and another little thing is path name must end with a file separator 

char, is it necessary (inconsistent with for eg. work-directory)?

What do you think to change these behaviours?

Idee: The directory name starting with "WEB-INF" goes to context path,
otherwise is set to absolute path,

and path name doesn't need to end with file separator char.

My proposal patch:
::::::::::::::
web.xml-patch
::::::::::::::
57,68c57,65
<       If the directory name starting with "/WEB-INF", it will be rootet as
the
< 	 servlets context path, otherwise will be set as an absolute path.
<       The default location is in the servlets context root at
/WEB-INF/logs.
< 	<init-param>
<        <param-name>log-dir</param-name>
< 	  <param-value>/data/debuging/logs</param-value>
<      </init-param>
< 			or 
< 	<init-param>
< 	  <param-name>log-dir</param-name>
<        <param-value>/WEB-INF/newlocation/logs</param-value>
<      </init-param>
---
>       Note that this path must be specified as an absolute path into your
filesystem
>       and it is not rooted at the servlets context path. Also note that
the path 
>       must end with a file separator character.
>       The default location is in the servlets context root at
/WEB-INF/logs/.
> 
>     <init-param>
>       <param-name>log-dir</param-name>
>       <param-value>/WEB-INF/logs</param-value>
>     </init-param>
151c148
< </web-app>
---
> </web-app>

::::::::::::::
CocoonServlet.java-patch
::::::::::::::
261,265c261,262
<             logDir = context.getRealPath("/") + "/WEB-INF/logs";
<         }else{
< 	   	  if(logDir.indexOf("/WEB-INF") != -1)
<             	logDir = context.getRealPath("/") + logDir;
< 	   }
---
>             logDir = context.getRealPath("/") + "/WEB-INF/logs/";
>         }
280c277
<             final String path = logDir + "/" +logName;
---
>             final String path = logDir + logName;

Cheers,

Tommy





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


Mime
View raw message