You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ian Wootten <I....@cs.cardiff.ac.uk> on 2005/02/16 18:26:55 UTC

Setting default tomcat logger 5.0.28

I'm having a right job trying to configure the default logger within
tomcat. I want to use log4j and set it at a DEBUG level.

I've added all the commons-logging.jar and log4j.jar packages to the
classpath, but every time I declare the properties file I wish to use
prior to these, it doesn't seem as if the log4j.properties file I want
to be read is. The output remains the same.

I've also tried to remedy this using the same method within the
tomcatw.exe app, as I read that tomcat doesn't read the default
CLASSPATH environment variables used by Windows XP and creates its own.
This still yields no joy. Also with this app I have tried specifying the
"log4j.configuration=/file" /property using the line
"-Dlog4j.configuration=C:\src\logging\log4jservice\log4j.properties"
under the java options. Still the file does not seem to be found.

Currently my properties file lies in a different directory
foo/bar/log4j.properties which I specify in the classpath, but as I say
it doesn't seem to be picked up. I've even placed it under
CATALINA_HOME/common/lib with the jar files in
CATALINA_HOME/common/classes, under the reference of the Tomcat 5.5
version, hoping this might work..it doesn't. (Incidentally, I can't use
Tomcat 5.5 due to restrictions on the software I'm going to generate).

Log4J works fine standalone, I've built a number of apps with it, just
not under tomcat it would seem.

Can anyone make any suggestions?

Thanks,

Ian


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Setting default tomcat logger 5.0.28

Posted by Ian Wootten <I....@cs.cardiff.ac.uk>.
I've managed to make some headway with this problem. I've moved my 
log4j.properties file over into the axis/web-inf/classes directory, and 
this catches all axis output, but what I want to know is how to direct 
all output to log4j. So, that initial startup stdout and stderr output 
to log4j. Is this possible?

Thanks

Ian

Ian Wootten wrote:

> I'm having a right job trying to configure the default logger within
> tomcat. I want to use log4j and set it at a DEBUG level.
>
> I've added all the commons-logging.jar and log4j.jar packages to the
> classpath, but every time I declare the properties file I wish to use
> prior to these, it doesn't seem as if the log4j.properties file I want
> to be read is. The output remains the same.
>
> I've also tried to remedy this using the same method within the
> tomcatw.exe app, as I read that tomcat doesn't read the default
> CLASSPATH environment variables used by Windows XP and creates its own.
> This still yields no joy. Also with this app I have tried specifying the
> "log4j.configuration=/file" /property using the line
> "-Dlog4j.configuration=C:\src\logging\log4jservice\log4j.properties"
> under the java options. Still the file does not seem to be found.
>
> Currently my properties file lies in a different directory
> foo/bar/log4j.properties which I specify in the classpath, but as I say
> it doesn't seem to be picked up. I've even placed it under
> CATALINA_HOME/common/lib with the jar files in
> CATALINA_HOME/common/classes, under the reference of the Tomcat 5.5
> version, hoping this might work..it doesn't. (Incidentally, I can't use
> Tomcat 5.5 due to restrictions on the software I'm going to generate).
>
> Log4J works fine standalone, I've built a number of apps with it, just
> not under tomcat it would seem.
>
> Can anyone make any suggestions?
>
> Thanks,
>
> Ian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org