> >Yes, but modifying org.apache.catalina.logger.FileLogger is clearly a
> >tomcat developer concept :). Of course, if I could, I would. I
> remember
> a
>
> Not for this list, it's not. Many tomcat users modify/extend/create
> their own Loggers, Valve, Manager, and other tomcat plug-ins.
Okay, here I am, my first Java lines. I downloaded tomcat 4.1.27 sources and perform
the following in :
src/share/org/apache/catalina/logger/FileLogger.java
Added a line
import java.lang.String;
In the import part of the file, Added :
private String localhostname = "";
to define the string near the suffix String declaration.
Then, I fetch the local host name like this :
public String getLocalHostName() {
return (localhostname);
}
As far as I understood it, it should return a string containing the local hostname.
And then, I modified that :
try {
String pathname = dir.getAbsolutePath() + File.separator +
prefix + date + localhostname + suffix;
writer = new PrintWriter(new FileWriter(pathname, true), true);
} catch (IOException e) {
writer = null;
}
And now, my friends[1]... I need to compile that class, but I can't find a way to make
it aware about all the things it imports. I understood I can declare this class (using
CLASSPATH) before the bootstrap and it will "overwrtite" or "surrender" the tomcat
class. But, how can I buid it ?
Thank you for your help and sorry to bother you with possibly trivial Java questions.
Fran�ois.
[1] We're going to the unknown... Perhaps to hell it's. It's a Spanish train...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]