You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by dOE <do...@gmail.com> on 2008/11/24 17:25:07 UTC

Setup Logging for Tomcat 6

I have downloaded "Apache-log4j-1.2.15.zip" from
http://tomcat.apache.org/tomcat-6.0-doc/logging.html, and began to following
some of the steps, and then I am left clueless on what to do following the
creation of the log4j.properties file, and copying "log4j-1.2.15.jar" in
/tomca/lib.  Then it asks to "Place
output/extras/tomcat-juli-adapters.jarin $CATALINA_HOME/lib."  I don't
know where "output/extras" is?

Any further guidance in this would be much MUCH appreciated.

RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: dOE [mailto:doepain@gmail.com]
> Subject: Re: Setup Logging for Tomcat 6
>
> Does that require me to download the source files for Tomcat, and then
> locate this Ant script?

Yes, that's why it says "part of teh [sic] Tomcat source bundle."

> The instructions are very vague and assume the
> individual is already well versed in managing
> Tomcat ...needless to say I am not.

Then why are you trying to change Tomcat's internal logging to use log4j?  You can use log4j in your webapps with converting Tomcat itself to use it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
Does that require me to download the source files for Tomcat, and then
locate this Ant script?  The instructions are very vague and assume the
individual is already well versed in managing Tomcat ...needless to say I am
not.

On Mon, Nov 24, 2008 at 2:17 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > -----Original Message-----
> > From: dOE [mailto:doepain@gmail.com]
> > Subject: Setup Logging for Tomcat 6
> >
> > I don't know where "output/extras" is?
>
> Did you do step 3?
> "Build the commons-logging additional component using the extras.xml Ant
> build script which is part of teh [sic] Tomcat source bundle."
>
> It's created in the source tree after you run the specified ant script.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> -----Original Message-----
> From: dOE [mailto:doepain@gmail.com]
> Subject: Setup Logging for Tomcat 6
>
> I don't know where "output/extras" is?

Did you do step 3?
"Build the commons-logging additional component using the extras.xml Ant build script which is part of teh [sic] Tomcat source bundle."

It's created in the source tree after you run the specified ant script.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
Ok, thanks

On Tue, Nov 25, 2008 at 12:52 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: dOE [mailto:doepain@gmail.com]
> > Subject: Re: Setup Logging for Tomcat 6
> >
> > No further insight as to why Tomcat 6 is not logging "out-of
> > -the-box"?
>
> Are you still using this "js-wrapper" thingie?  If so, no one will be
> interested.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Setup Logging for Tomcat 6

Posted by André Warnier <aw...@ice-sa.com>.
Caldarale, Charles R wrote:
>> From: dOE [mailto:doepain@gmail.com]
>> Subject: Re: Setup Logging for Tomcat 6
>>
>> No further insight as to why Tomcat 6 is not logging "out-of
>> -the-box"?
> 
> Are you still using this "js-wrapper" thingie?  If so, no one will be interested.
> 
To put this more diplomatically (and considerably more words) :

The js-wrapper is an application written by other people, and has 
nothing to do with Tomcat itself.  It can, or cannot, be "doing things" 
to intercept the standard Tomcat logging and send it somewhere else.
The people on this list answering Tomcat-related questions are not using 
js-wrapper, so they do not know if it does do something to the logfiles 
or not, and thus they cannot really help you.

The standard Tomcat packages for Windows, as downloaded from the Tomcat 
website, do write logfiles, in the (tomcat_install_dir)/logs directory. 
So they do logging "out-of-the-box".

Yours apparently does not, but the reason for that cannot be determined 
as long as you are running Tomcat under control of js-wrapper.
You should first either ask the supplier of js-wrapper what they are 
doing with the logs, or remove this Tomcat version, install a standard 
one, and then come back here if you have more questions.

Understand, this does not mean that js-wrapper is not a good product. It 
is just that it makes it difficult in this context to answer your questions.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: dOE [mailto:doepain@gmail.com]
> Subject: Re: Setup Logging for Tomcat 6
>
> No further insight as to why Tomcat 6 is not logging "out-of
> -the-box"?

Are you still using this "js-wrapper" thingie?  If so, no one will be interested.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
No further insight as to why Tomcat 6 is not logging "out-of -the-box"?

On Mon, Nov 24, 2008 at 10:25 PM, dOE <do...@gmail.com> wrote:

> the JS-wrapper can redirect its output to event viewer.
>
>
> On Mon, Nov 24, 2008 at 7:13 PM, Michael Ludwig <mi...@gmx.de> wrote:
>
>> André Warnier schrieb am 24.11.2008 um 21:35:50 (+0100):
>> > dOE wrote:
>> > >Its running on win32,
>> > >
>> > >JVM is 1.6
>> > >
>> > >installed via js-wrapper.
>> >
>> > I don't know that js-wrapper, but if this is under Windows, might not
>> > the logs be all redirected in the Windows system logs ?
>>
>> If this is possible, it's not the default. But is it possible? If so,
>> what do I have to do to set it up to use the Windows Event Viewer?
>>
>> > "My computer" icon, right-click, "Manage", then the first "folder"
>> > under "System".
>> > (Can't tell you exactly, this PC is German, and there it's called
>> > "Ereignisanzeige")
>>
>> Shortcut: Hit Windows-r, then type "eventvwr.msc".
>>
>> Michael Ludwig
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>

Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
the JS-wrapper can redirect its output to event viewer.

On Mon, Nov 24, 2008 at 7:13 PM, Michael Ludwig <mi...@gmx.de> wrote:

> André Warnier schrieb am 24.11.2008 um 21:35:50 (+0100):
> > dOE wrote:
> > >Its running on win32,
> > >
> > >JVM is 1.6
> > >
> > >installed via js-wrapper.
> >
> > I don't know that js-wrapper, but if this is under Windows, might not
> > the logs be all redirected in the Windows system logs ?
>
> If this is possible, it's not the default. But is it possible? If so,
> what do I have to do to set it up to use the Windows Event Viewer?
>
> > "My computer" icon, right-click, "Manage", then the first "folder"
> > under "System".
> > (Can't tell you exactly, this PC is German, and there it's called
> > "Ereignisanzeige")
>
> Shortcut: Hit Windows-r, then type "eventvwr.msc".
>
> Michael Ludwig
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Setup Logging for Tomcat 6

Posted by Michael Ludwig <mi...@gmx.de>.
André Warnier schrieb am 24.11.2008 um 21:35:50 (+0100):
> dOE wrote:
> >Its running on win32,
> >
> >JVM is 1.6
> >
> >installed via js-wrapper.
> 
> I don't know that js-wrapper, but if this is under Windows, might not
> the logs be all redirected in the Windows system logs ?

If this is possible, it's not the default. But is it possible? If so,
what do I have to do to set it up to use the Windows Event Viewer?

> "My computer" icon, right-click, "Manage", then the first "folder"
> under "System".
> (Can't tell you exactly, this PC is German, and there it's called 
> "Ereignisanzeige")

Shortcut: Hit Windows-r, then type "eventvwr.msc".

Michael Ludwig

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
The JS-Wrapper should have no effect on the built-in tomcat logging.  It
(js-wrapper) can only log its self.

On Mon, Nov 24, 2008 at 3:35 PM, André Warnier <aw...@ice-sa.com> wrote:

> dOE wrote:
>
>> Its running on win32,
>>
>> JVM is 1.6
>>
>> installed via js-wrapper.
>>
>
> I don't know that js-wrapper, but if this is under Windows, might not the
> logs be all redirected in the Windows system logs ?
> "My computer" icon, right-click, "Manage", then the first "folder" under
> "System".
> (Can't tell you exactly, this PC is German, and there it's called
> "Ereignisanzeige")
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Setup Logging for Tomcat 6

Posted by André Warnier <aw...@ice-sa.com>.
dOE wrote:
> Its running on win32,
> 
> JVM is 1.6
> 
> installed via js-wrapper.

I don't know that js-wrapper, but if this is under Windows, might not 
the logs be all redirected in the Windows system logs ?
"My computer" icon, right-click, "Manage", then the first "folder" under 
"System".
(Can't tell you exactly, this PC is German, and there it's called 
"Ereignisanzeige")

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
I have the *.zip version.

On Mon, Nov 24, 2008 at 3:48 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: dOE [mailto:doepain@gmail.com]
> > Subject: Re: Setup Logging for Tomcat 6
> >
> > Its running on win32,
>
> O.k.
>
> > JVM is 1.6
>
> O.k.
>
> > installed via js-wrapper.
>
> ??? Not bloody likely.  Download Tomcat from
> http://tomcat.apache.org/download-60.cgi (the .zip version, not the .exe),
> do a fresh install of it, and try running the catalina.bat script and see
> what it says.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: dOE [mailto:doepain@gmail.com]
> Subject: Re: Setup Logging for Tomcat 6
>
> Its running on win32,

O.k.

> JVM is 1.6

O.k.

> installed via js-wrapper.

??? Not bloody likely.  Download Tomcat from http://tomcat.apache.org/download-60.cgi (the .zip version, not the .exe), do a fresh install of it, and try running the catalina.bat script and see what it says.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
Its running on win32,

JVM is 1.6

installed via js-wrapper.

On Mon, Nov 24, 2008 at 3:27 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: dOE [mailto:doepain@gmail.com]
> > Subject: Re: Setup Logging for Tomcat 6
> >
> > At the moment my Tomcat is not generating any log out put,
>
> What platform are you running on?
>
> What JVM version are you using?
>
> How did you install Tomcat?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: dOE [mailto:doepain@gmail.com]
> Subject: Re: Setup Logging for Tomcat 6
>
> At the moment my Tomcat is not generating any log out put,

What platform are you running on?

What JVM version are you using?

How did you install Tomcat?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
At the moment my Tomcat is not generating any log out put, and this is a
simple default installation.  I am interested in "localhost mostly, and
Catalina logs...

On Mon, Nov 24, 2008 at 3:10 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: dOE [mailto:doepain@gmail.com]
> > Subject: Re: Setup Logging for Tomcat 6
> >
> > All I want is for my Tomcat 6 to spit out some logs, and be
> > default it's not.
>
> The phrase "spit out some logs" is pretty meaningless; what are you really
> trying to accomplish?  By default, Tomcat's logs are in its logs directory,
> which usually contains several different log streams (e.g., catalina,
> host-manager, localhost, manager).  You do not have to convert Tomcat to use
> log4j; it logs its own actions properly right out of the box.
>
> If you want your webapp to log things, that has to be done in the code of
> the webapp.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: dOE [mailto:doepain@gmail.com]
> Subject: Re: Setup Logging for Tomcat 6
>
> All I want is for my Tomcat 6 to spit out some logs, and be
> default it's not.

The phrase "spit out some logs" is pretty meaningless; what are you really trying to accomplish?  By default, Tomcat's logs are in its logs directory, which usually contains several different log streams (e.g., catalina, host-manager, localhost, manager).  You do not have to convert Tomcat to use log4j; it logs its own actions properly right out of the box.

If you want your webapp to log things, that has to be done in the code of the webapp.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by dOE <do...@gmail.com>.
All I want is for my Tomcat 6 to spit out some logs, and be default it's
not.  Does not have to be log4j.xml if it does not have to be, but I was
under the assumption that logging changed for where we had to implement the
setup I posted in my original link.

On Mon, Nov 24, 2008 at 2:33 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: removeps-groups@yahoo.com [mailto:removeps-groups@yahoo.com]
> > Subject: Re: Setup Logging for Tomcat 6
> >
> > Copy the log4j jar file to WEB-INF/lib.  Put it in
> > ${catalina.home}/lib if you want all webapps to be able to
> > see this file.
>
> You really don't want to put the log4j.jar into Tomcat's lib directory
> unless you actually want all the webapps to *share* (not just "see") the
> same logging complex.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Michael Ludwig [mailto:milu71@gmx.de]
> Subject: Re: Setup Logging for Tomcat 6
>
> I didn't. I'm a Tomcat newbie. But I discovered the other day
> that you can place libraries in the shared.loader by editing
> "conf/catalina.properties".

Unless you really, really need to do that, don't.  It's there primarily for people who can't (or won't) move to the new classloader structure when upgrading from older versions.  Adding more classloaders to the hierarchy only slows things down.

> May we consider it deprecated?

Pretty much, yes.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by Michael Ludwig <mi...@gmx.de>.
Caldarale, Charles R schrieb am 24.11.2008 um 19:37:52 (-0600):
> > From: Michael Ludwig [mailto:milu71@gmx.de]
> > Subject: Re: Setup Logging for Tomcat 6
> >
> > Does the same hold true for the "shared.loader"?
> 
> It holds true for *any* classloader in the hierarchy.

Thanks for this clarification.

> The shared.loader is disabled in the standard Tomcat 6
> config, as you probably know.

I didn't. I'm a Tomcat newbie. But I discovered the other day
that you can place libraries in the shared.loader by editing
"conf/catalina.properties".

I wondered why this wasn't stated more clearly in the
documentation for Tomcat 6. I only understood the issue
reading the documentation for Tomcat 5. The shared.loader
is still there in Tomcat 6, but not explained.

What's the rationale behind disabling it?

May we consider it deprecated?

Michael Ludwig

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Michael Ludwig [mailto:milu71@gmx.de]
> Subject: Re: Setup Logging for Tomcat 6
>
> Does the same hold true for the "shared.loader"?

It holds true for *any* classloader in the hierarchy.  The shared.loader is disabled in the standard Tomcat 6 config, as you probably know.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by Michael Ludwig <mi...@gmx.de>.
Caldarale, Charles R schrieb am 24.11.2008 um 18:53:06 (-0600):
> > From: Michael Ludwig [mailto:milu71@gmx.de]
> > Subject: Re: Setup Logging for Tomcat 6
> >
> > "See the driver" - I think I used that expression yesterday. "Share a
> > logging complex" - could you expand a bit on what this means,
> > or provide a pointer to an informative document?
> 
> Look at Tomcat's class loading hierarchy.  Classes loaded from
> Tomcat's lib directory are shared at runtime by all webapps (and
> Tomcat, for that matter), whereas classes coming from a webapp's
> WEB-INF/lib or WEB-INF/classes are local to that webapp.  If the
> classes from Tomcat's lib directory have any static fields or
> singleton objects, only one copy of those fields and objects exist
> for all the webapps.

I see. I wasn't aware of this property of the "common.loader".

Does the same hold true for the "shared.loader"?

> I haven't looked inside log4j to see just what information in
> maintains in static fields or singletons, but keeping the log4j.jar
> with each webapp insures you won't get any unwarranted interaction in
> your webapps' logging.

This make sense. Thanks!

Michael Ludwig

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Michael Ludwig [mailto:milu71@gmx.de]
> Subject: Re: Setup Logging for Tomcat 6
>
> "See the driver" - I think I used that expression yesterday. "Share a
> logging complex" - could you expand a bit on what this means,
> or provide a pointer to an informative document?

Look at Tomcat's class loading hierarchy.  Classes loaded from Tomcat's lib directory are shared at runtime by all webapps (and Tomcat, for that matter), whereas classes coming from a webapp's WEB-INF/lib or WEB-INF/classes are local to that webapp.  If the classes from Tomcat's lib directory have any static fields or singleton objects, only one copy of those fields and objects exist for all the webapps.

I haven't looked inside log4j to see just what information in maintains in static fields or singletons, but keeping the log4j.jar with each webapp insures you won't get any unwarranted interaction in your webapps' logging.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by Michael Ludwig <mi...@gmx.de>.
Caldarale, Charles R schrieb am 24.11.2008 um 13:33:39 (-0600):
> > From: removeps-groups@yahoo.com [mailto:removeps-groups@yahoo.com]
> > Subject: Re: Setup Logging for Tomcat 6
> >
> > Copy the log4j jar file to WEB-INF/lib.  Put it in
> > ${catalina.home}/lib if you want all webapps to be able to
> > see this file.
> 
> You really don't want to put the log4j.jar into Tomcat's lib directory
> unless you actually want all the webapps to *share* (not just "see")
> the same logging complex.

"See the driver" - I think I used that expression yesterday. "Share a
logging complex" - could you expand a bit on what this means, or provide
a pointer to an informative document?

Thanks.

Michael Ludwig

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Setup Logging for Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: removeps-groups@yahoo.com [mailto:removeps-groups@yahoo.com]
> Subject: Re: Setup Logging for Tomcat 6
>
> Copy the log4j jar file to WEB-INF/lib.  Put it in
> ${catalina.home}/lib if you want all webapps to be able to
> see this file.

You really don't want to put the log4j.jar into Tomcat's lib directory unless you actually want all the webapps to *share* (not just "see") the same logging complex.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Setup Logging for Tomcat 6

Posted by re...@yahoo.com.
To setup log4j, here's what I did.

Copy the log4j jar file to WEB-INF/lib.  Put it in ${catalina.home}/lib if you want all webapps to be able to see this file.

Create a log4j.properties.  Initially this file was in WEB-INF/classes/log4j.properties.  Now I have the file in WEB-INF/lib/myjarfile.jar!log4j.properties (that is, at the root level of the jar file).

That's it, if I remember correctly.

When the properties file specifies a relative filename, it appears to be relative to ${catalina.home}, so specify for example "logs/myfile.log".

--- On Mon, 11/24/08, dOE <do...@gmail.com> wrote:

> From: dOE <do...@gmail.com>
> Subject: Setup Logging for Tomcat 6
> To: "Tomcat User-List" <us...@tomcat.apache.org>
> Date: Monday, November 24, 2008, 8:25 AM
> I have downloaded "Apache-log4j-1.2.15.zip" from
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html, and
> began to following
> some of the steps, and then I am left clueless on what to
> do following the
> creation of the log4j.properties file, and copying
> "log4j-1.2.15.jar" in
> /tomca/lib.  Then it asks to "Place
> output/extras/tomcat-juli-adapters.jarin
> $CATALINA_HOME/lib."  I don't
> know where "output/extras" is?
> 
> Any further guidance in this would be much MUCH
> appreciated.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org