You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Claassen <mc...@ocie.net> on 2007/06/12 17:30:30 UTC

Using log4J and getting rid of default logs in Tomcat 6

I would like to have all my logging go through log4J and not have the
default XXX.date.log files created.  Is there a way to do this?  I got log4j
working, as it says in the docs, but the localhost.date.log is still created
and written to.  From what I understand, I will need to put a
log4j.properties in the admin and manager webapps to get these to go away,
but I am not sure what to put in them.  

Has anyone done this?  Is there a good on-line resource I can check?  The
logs I would like to get rid of, and replace with log4J managed logs are:

          0 Jun 12 11:19 admin.2007-06-12.log
       1585 Jun 12 11:20 catalina.2007-06-12.log
          0 Jun 12 11:19 host-manager.2007-06-12.log
        736 Jun 12 11:20 localhost.2007-06-12.log
          0 Jun 12 11:19 manager.2007-06-12.log

Thanks,
Mark


---------------------------------------------------------------------
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: Tomcat 6 jsp compilation

Posted by Lakshmi Venkataraman <la...@foundrynet.com>.
One of the things to do is to ensure that you have app specific web.xml
placed in an
appropriate location.  This web.xml must have <servlet> and
<servlet-mapping> defined
for every precompiled jsp file as follows:
<servlet>
       <servlet-name>ImageImport</servlet-name>
       <servlet-class>jsp.imageupload</servlet-class>
</servlet>
<servlet-mapping>
        <servlet-name>ImageImport</servlet-name>
        <url-pattern>/jsp/imageupload.jsp</url-pattern>
</servlet-mapping>



--Lakshmi
-----Original Message-----
From: Manca Davide [mailto:davide.manca@matrix.it] 
Sent: Tuesday, June 12, 2007 8:37 AM
To: Tomcat Users List
Subject: Tomcat 6 jsp compilation

Hello,

how can I say to Tomcat 6 to NOT compile jsp into .class files?
This because we have more machines with a Tomcat 6 each one and they
should read a read-only nfs file system in which we have precompiled
.class files.

Thank you.


---------------------------------------------------------------------
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


Tomcat 6 jsp compilation

Posted by Manca Davide <da...@matrix.it>.
Hello,

how can I say to Tomcat 6 to NOT compile jsp into .class files?
This because we have more machines with a Tomcat 6 each one and they should read a read-only nfs file system in which we have precompiled .class files.

Thank you.


RE: Using log4J and getting rid of default logs in Tomcat 6

Posted by Mark Claassen <mc...@ocie.net>.
Yep.  And, as I said, it is working to some degree.  I just want to get info
from the other "canned" webapps in there.  As well as have some certainty
that I am getting what I am supposed to.

 
-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Barker
Sent: Tuesday, June 12, 2007 10:47 PM
To: users@tomcat.apache.org
Subject: Re: Using log4J and getting rid of default logs in Tomcat 6


"Mark Claassen" <mc...@ocie.net> wrote in message
news:000f01c7ad5e$91b926f0$5101a8c0@K9...
>
> Thanks for the reply.
>
> I did get some logging to work already, so I am assuming that I have 
> it configured correctly.  I did the compile of the "extras" and log4j 1.2.
>
> By removing the logging.properties, I got rid of the default logs, but 
> I am not getting all the same output.  I interpreted the documentation 
> as saying that I can use log4J as long as I compile the extras.  Are 
> you saying that this still gives an incomplete picture?
>

I agree that the instructions are a bit sparse.  Did you actually replace
$CATALINA_HOME/bin/tomcat-juli.jar with the one built in extras?

> Mark
>
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Barker
> Sent: Tuesday, June 12, 2007 9:42 PM
> To: users@tomcat.apache.org
> Subject: Re: Using log4J and getting rid of default logs in Tomcat 6
>
> See the note at the top of
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html.  By default, TC 
> 6 only uses Juli for it's internal logging.
>
> "Mark Claassen" <mc...@ocie.net> wrote in message 
> news:005601c7ad0a$741eeb10$19c909c0@K9...
>> As it turns out, getting rid of the old logging.properties file I had 
>> solved the problem.  However, how I am not sure I am getting all the 
>> information used to be.
>>
>> Looking at some other examples, this seems to be the list of loggers 
>> to define.  Is this correct?
>>
>> log4j.rootLogger=INFO, ROOT
>> log4j.logger.org.apache.catalina=INFO, CATALINA 
>> log4j.logger.org.apache.catalina.core=INFO, CORE 
>> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[local
>> h
>> ost]=I
>> NFO, LOCALHOST
>> log4j.logger.org.apache.catalina.session=INFO, SESSION
>>
>> Can syntax like in the logging.properties be used as well:
>>   ....[/host-manager] =
>> like:
>>
>> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[local
>> h
>> ost]=I
>> NFO, MANAGER
>>
>> Thanks,
>> Mark
>>
>> -----Original Message-----
>> From: Mark Claassen [mailto:mclaassen@ocie.net]
>> Sent: Tuesday, June 12, 2007 11:31 AM
>> To: 'Tomcat Users List'
>> Subject: Using log4J and getting rid of default logs in Tomcat 6
>>
>> I would like to have all my logging go through log4J and not have the 
>> default XXX.date.log files created.  Is there a way to do this?  I 
>> got log4j working, as it says in the docs, but the localhost.date.log 
>> is still created and written to.  From what I understand, I will need 
>> to put a log4j.properties in the admin and manager webapps to get 
>> these to go away, but I am not sure what to put in them.
>>
>> Has anyone done this?  Is there a good on-line resource I can check?
>> The logs I would like to get rid of, and replace with log4J managed 
>> logs
> are:
>>
>>          0 Jun 12 11:19 admin.2007-06-12.log
>>       1585 Jun 12 11:20 catalina.2007-06-12.log
>>          0 Jun 12 11:19 host-manager.2007-06-12.log
>>        736 Jun 12 11:20 localhost.2007-06-12.log
>>          0 Jun 12 11:19 manager.2007-06-12.log
>>
>> Thanks,
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
> ---------------------------------------------------------------------
> 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
>
> 




---------------------------------------------------------------------
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


---------------------------------------------------------------------
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: Using log4J and getting rid of default logs in Tomcat 6

Posted by Bill Barker <wb...@wilshire.com>.
"Mark Claassen" <mc...@ocie.net> wrote in message 
news:000f01c7ad5e$91b926f0$5101a8c0@K9...
>
> Thanks for the reply.
>
> I did get some logging to work already, so I am assuming that I have it
> configured correctly.  I did the compile of the "extras" and log4j 1.2.
>
> By removing the logging.properties, I got rid of the default logs, but I 
> am
> not getting all the same output.  I interpreted the documentation as 
> saying
> that I can use log4J as long as I compile the extras.  Are you saying that
> this still gives an incomplete picture?
>

I agree that the instructions are a bit sparse.  Did you actually replace 
$CATALINA_HOME/bin/tomcat-juli.jar with the one built in extras?

> Mark
>
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Barker
> Sent: Tuesday, June 12, 2007 9:42 PM
> To: users@tomcat.apache.org
> Subject: Re: Using log4J and getting rid of default logs in Tomcat 6
>
> See the note at the top of
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html.  By default, TC 6 
> only
> uses Juli for it's internal logging.
>
> "Mark Claassen" <mc...@ocie.net> wrote in message
> news:005601c7ad0a$741eeb10$19c909c0@K9...
>> As it turns out, getting rid of the old logging.properties file I had
>> solved the problem.  However, how I am not sure I am getting all the
>> information used to be.
>>
>> Looking at some other examples, this seems to be the list of loggers
>> to define.  Is this correct?
>>
>> log4j.rootLogger=INFO, ROOT
>> log4j.logger.org.apache.catalina=INFO, CATALINA
>> log4j.logger.org.apache.catalina.core=INFO, CORE
>> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localh
>> ost]=I
>> NFO, LOCALHOST
>> log4j.logger.org.apache.catalina.session=INFO, SESSION
>>
>> Can syntax like in the logging.properties be used as well:
>>   ....[/host-manager] =
>> like:
>>
>> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localh
>> ost]=I
>> NFO, MANAGER
>>
>> Thanks,
>> Mark
>>
>> -----Original Message-----
>> From: Mark Claassen [mailto:mclaassen@ocie.net]
>> Sent: Tuesday, June 12, 2007 11:31 AM
>> To: 'Tomcat Users List'
>> Subject: Using log4J and getting rid of default logs in Tomcat 6
>>
>> I would like to have all my logging go through log4J and not have the
>> default XXX.date.log files created.  Is there a way to do this?  I got
>> log4j working, as it says in the docs, but the localhost.date.log is
>> still created and written to.  From what I understand, I will need to
>> put a log4j.properties in the admin and manager webapps to get these
>> to go away, but I am not sure what to put in them.
>>
>> Has anyone done this?  Is there a good on-line resource I can check?
>> The logs I would like to get rid of, and replace with log4J managed logs
> are:
>>
>>          0 Jun 12 11:19 admin.2007-06-12.log
>>       1585 Jun 12 11:20 catalina.2007-06-12.log
>>          0 Jun 12 11:19 host-manager.2007-06-12.log
>>        736 Jun 12 11:20 localhost.2007-06-12.log
>>          0 Jun 12 11:19 manager.2007-06-12.log
>>
>> Thanks,
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
> ---------------------------------------------------------------------
> 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
>
> 




---------------------------------------------------------------------
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: Using log4J and getting rid of default logs in Tomcat 6

Posted by Mark Claassen <mc...@ocie.net>.
 
Thanks for the reply.

I did get some logging to work already, so I am assuming that I have it
configured correctly.  I did the compile of the "extras" and log4j 1.2.

By removing the logging.properties, I got rid of the default logs, but I am
not getting all the same output.  I interpreted the documentation as saying
that I can use log4J as long as I compile the extras.  Are you saying that
this still gives an incomplete picture?

Mark

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Barker
Sent: Tuesday, June 12, 2007 9:42 PM
To: users@tomcat.apache.org
Subject: Re: Using log4J and getting rid of default logs in Tomcat 6

See the note at the top of
http://tomcat.apache.org/tomcat-6.0-doc/logging.html.  By default, TC 6 only
uses Juli for it's internal logging.

"Mark Claassen" <mc...@ocie.net> wrote in message
news:005601c7ad0a$741eeb10$19c909c0@K9...
> As it turns out, getting rid of the old logging.properties file I had 
> solved the problem.  However, how I am not sure I am getting all the 
> information used to be.
>
> Looking at some other examples, this seems to be the list of loggers 
> to define.  Is this correct?
>
> log4j.rootLogger=INFO, ROOT
> log4j.logger.org.apache.catalina=INFO, CATALINA 
> log4j.logger.org.apache.catalina.core=INFO, CORE 
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localh
> ost]=I
> NFO, LOCALHOST
> log4j.logger.org.apache.catalina.session=INFO, SESSION
>
> Can syntax like in the logging.properties be used as well:
>   ....[/host-manager] =
> like:
>
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localh
> ost]=I
> NFO, MANAGER
>
> Thanks,
> Mark
>
> -----Original Message-----
> From: Mark Claassen [mailto:mclaassen@ocie.net]
> Sent: Tuesday, June 12, 2007 11:31 AM
> To: 'Tomcat Users List'
> Subject: Using log4J and getting rid of default logs in Tomcat 6
>
> I would like to have all my logging go through log4J and not have the 
> default XXX.date.log files created.  Is there a way to do this?  I got 
> log4j working, as it says in the docs, but the localhost.date.log is 
> still created and written to.  From what I understand, I will need to 
> put a log4j.properties in the admin and manager webapps to get these 
> to go away, but I am not sure what to put in them.
>
> Has anyone done this?  Is there a good on-line resource I can check?  
> The logs I would like to get rid of, and replace with log4J managed logs
are:
>
>          0 Jun 12 11:19 admin.2007-06-12.log
>       1585 Jun 12 11:20 catalina.2007-06-12.log
>          0 Jun 12 11:19 host-manager.2007-06-12.log
>        736 Jun 12 11:20 localhost.2007-06-12.log
>          0 Jun 12 11:19 manager.2007-06-12.log
>
> Thanks,
> Mark
>
>
> ---------------------------------------------------------------------
> 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
>
>
> ---------------------------------------------------------------------
> 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
>
> 




---------------------------------------------------------------------
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


---------------------------------------------------------------------
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: Using log4J and getting rid of default logs in Tomcat 6

Posted by Bill Barker <wb...@wilshire.com>.
See the note at the top of 
http://tomcat.apache.org/tomcat-6.0-doc/logging.html.  By default, TC 6 only 
uses Juli for it's internal logging.

"Mark Claassen" <mc...@ocie.net> wrote in message 
news:005601c7ad0a$741eeb10$19c909c0@K9...
> As it turns out, getting rid of the old logging.properties file I had 
> solved
> the problem.  However, how I am not sure I am getting all the information
> used to be.
>
> Looking at some other examples, this seems to be the list of loggers to
> define.  Is this correct?
>
> log4j.rootLogger=INFO, ROOT
> log4j.logger.org.apache.catalina=INFO, CATALINA
> log4j.logger.org.apache.catalina.core=INFO, CORE
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=I
> NFO, LOCALHOST
> log4j.logger.org.apache.catalina.session=INFO, SESSION
>
> Can syntax like in the logging.properties be used as well:
>   ....[/host-manager] =
> like:
>
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=I
> NFO, MANAGER
>
> Thanks,
> Mark
>
> -----Original Message-----
> From: Mark Claassen [mailto:mclaassen@ocie.net]
> Sent: Tuesday, June 12, 2007 11:31 AM
> To: 'Tomcat Users List'
> Subject: Using log4J and getting rid of default logs in Tomcat 6
>
> I would like to have all my logging go through log4J and not have the
> default XXX.date.log files created.  Is there a way to do this?  I got 
> log4j
> working, as it says in the docs, but the localhost.date.log is still 
> created
> and written to.  From what I understand, I will need to put a
> log4j.properties in the admin and manager webapps to get these to go away,
> but I am not sure what to put in them.
>
> Has anyone done this?  Is there a good on-line resource I can check?  The
> logs I would like to get rid of, and replace with log4J managed logs are:
>
>          0 Jun 12 11:19 admin.2007-06-12.log
>       1585 Jun 12 11:20 catalina.2007-06-12.log
>          0 Jun 12 11:19 host-manager.2007-06-12.log
>        736 Jun 12 11:20 localhost.2007-06-12.log
>          0 Jun 12 11:19 manager.2007-06-12.log
>
> Thanks,
> Mark
>
>
> ---------------------------------------------------------------------
> 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
>
>
> ---------------------------------------------------------------------
> 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
>
> 




---------------------------------------------------------------------
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: Using log4J and getting rid of default logs in Tomcat 6

Posted by Mark Claassen <mc...@ocie.net>.
As it turns out, getting rid of the old logging.properties file I had solved
the problem.  However, how I am not sure I am getting all the information
used to be.

Looking at some other examples, this seems to be the list of loggers to
define.  Is this correct?

log4j.rootLogger=INFO, ROOT
log4j.logger.org.apache.catalina=INFO, CATALINA
log4j.logger.org.apache.catalina.core=INFO, CORE
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=I
NFO, LOCALHOST
log4j.logger.org.apache.catalina.session=INFO, SESSION

Can syntax like in the logging.properties be used as well:
   ....[/host-manager] = 
like:
 
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=I
NFO, MANAGER

Thanks,
Mark

-----Original Message-----
From: Mark Claassen [mailto:mclaassen@ocie.net] 
Sent: Tuesday, June 12, 2007 11:31 AM
To: 'Tomcat Users List'
Subject: Using log4J and getting rid of default logs in Tomcat 6

I would like to have all my logging go through log4J and not have the
default XXX.date.log files created.  Is there a way to do this?  I got log4j
working, as it says in the docs, but the localhost.date.log is still created
and written to.  From what I understand, I will need to put a
log4j.properties in the admin and manager webapps to get these to go away,
but I am not sure what to put in them.  

Has anyone done this?  Is there a good on-line resource I can check?  The
logs I would like to get rid of, and replace with log4J managed logs are:

          0 Jun 12 11:19 admin.2007-06-12.log
       1585 Jun 12 11:20 catalina.2007-06-12.log
          0 Jun 12 11:19 host-manager.2007-06-12.log
        736 Jun 12 11:20 localhost.2007-06-12.log
          0 Jun 12 11:19 manager.2007-06-12.log

Thanks,
Mark


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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