Re: Log4J configuration

"Terry Steichen" <[email protected]>
Newsgroups gmane.comp.java.enhydra.general
Message-ID <02c801c30e88$988bdd70$0501a8c0@POWERPACK>
Thelmo,

I'd be interested in seeing your patch.  This is a bothersome point and a
good solution would be welcome.

Regards,

Terry

----- Original Message -----
From: "Thelmo Loisio" <[email protected]>
To: <[email protected]>
Sent: Tuesday, April 29, 2003 12:01 PM
Subject: Enhydra: Log4J configuration


> I'm digging through an issue (quite small) with the deploying of enhydra
> apps in a different servlet container as the release-notes.html states.
>
> This is the issue:
> At line 592 of HttpPresentationServlet.java you get private
> configureLogger(String) method which gets the servlet "ConfFile"
> parameter value, extract the directory path from it and try to read a
> file named log4j.xml from that directory path. For extracts directory
> path of that parameter value it search for String.lastIndexOf("/") and
> compare it with String.lastIndexOf("\\") which can result in an empty
> directory path if you put only a filename within "ConfFile" parameter in
> web.xml (for ex myApp.conf insted of /full/path/to/myApp.conf), this
> results in HttpPresentationServlet.configureLogger(String) to look for
> log4j.xml file in the "actual current" directory, with "actual current"
> i mean the directory from which you start your servlet container
> (actually tested only on Tomcat 4.1).
>
> I think it's better to modify that method to check if the "ConfFile"
> parameter has _no_ directory path and then try for it to look at WEB-INF
> subdirectory of the webapps.
>
> If you care i can provide a patch.
>
> Hope of to have been clear ;)
>
> Regards,
> Thelmo
>
>
> _______________________________________________
> Enhydra mailing list
> [email protected]
> http://www.enhydra.org/mailman/listinfo.cgi/enhydra
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.