"jim shirreffs" <jpsb@verizon.net> said:
>> "jim shirreffs" <jpsb@verizon.net> said:
>>>I have tried just about everything to get logging working in tomcat5.5.7.
[quoted text clipped - 38 lines]
>thougt all Tomcat required jars should go. I have also removed all the
>log4j.properties files I could find.
jre/lib/ext is at least part of the bootstrap classpath, and I think it
could make its way to some other Tomcat classpaths as well. But now,
what in your setup does require log4j, as plain Tomcat works without
log4j just fine?
>My thinking is that Tomcat will default to it's own logging mechanism if
>nothing else is available (used to work that way).
The logging mechanism used by Tomcat is Jakarta commons-logging
package, and by default it will use either log4j, the JDK 1.4 logging
subsystem, or its internal simple logger (in this order, as support
classes are found). But as I wrote earlier, this can be overridden with
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
in JAVA_OPTS at tomcat startup. Could you see if this helps you?
>Other then server.xml I do not touch Tomcat configuration files. So I
>basicly install, modify the server.xml and then run. I also do not use a
>classpath when running Tomcat, so the only thing Tomcat should see the
>jre/lib/ext and it's own stuff. I did manage to get Tomcat to at least
>create log files on one computer (reinstalled everything) but it never
>writes to them, the other computer does not even create the log files.
Well, log4j doesn't end in jre/lib/ext by itself, so someone did place
it there. Looks like you should go back to a very clean situation and
trace forward step by step from there, to find out which of your
installs do what behind the scenes. You clearly are not in control of
the situation any more. Stop chaos, take control. Then start building
gain, step by step - and paying attention to what all happens. Then,
if something unexpected happens, you can backtrack just a single step,
instead of redo-all.
>What I probably need is a boiler plate lo4j.properties file for Tomcat that
>I can put into common/classes , but the install does not contain one. I've
>tried the following as a log4j.properties file but without success.
Don't stagger in the darkness. Find a place where you know which
pieces are affecting the play - and control the playground yourself.
So, don't just place things all over by random guesses - looks
like that's how you ended in your current situation in the first
place.
So, things to determine:
- what in your system requires log4j; is it an essential part of
your environment; is jre/lib/ext really the proper place for log4j
- is Tomcat the only thing in your environment using commons-logging;
if so, force commons-logging to revert to other logging backends
instead of using log4j (if you can't place log4j into such a place
that it doesn't affect Tomcat internals, but still is available to
webapps)

Signature
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
jim shirreffs - 13 Nov 2005 15:33 GMT
Well I found the problem, or rather I found where the problem is, something
in my lib/ext was screwing up Tomcat logging. I removed the lib/ext
directory and logging started working. Now I will look at every jar in
lib/ext and find the offended jar.
thanks HalcyonWild and Juha Laiho
jim s
> "jim shirreffs" <jpsb@verizon.net> said:
>>
[quoted text clipped - 93 lines]
> that it doesn't affect Tomcat internals, but still is available to
> webapps)