RE: clean start. Logging in tomcat 559

2005-04-13 Thread Pawson, David
Now I have logging working.
Using log4j-1.2.9

My application is 'hub'

put the properties file named log4j.properties in tc's classpath
(I use webapps/hub/WEB-INF/classes )

put the log4j-1.2.9.jar into webapps/hub/WEB-INF/lib

Init as follows:

//jakarta log4j
import org.apache.log4j.*;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;

Logger lg = Logger.getLogger("hub1");
The 'name' (hubl) is arbitrary, read the log4j manual for more.
then use as needed, e.g.

lg.error("** hub logging started **");

The properties file I used is below.
It produces output in ${catalina.home}/logs/tomcat.log
as specified in the properties file


log4j.rootLogger=DEBUG, hubl
#log4j.appender.hubl=org.apache.log4j.ConsoleAppender
log4j.appender.hubl=org.apache.log4j.RollingFileAppender
log4j.appender.hubl.File=/tomcat559/logs/tomcat.log 
log4j.appender.hubl.MaxFileSize=1MB
log4j.appender.hubl.MaxBackupIndex=3
log4j.appender.hubl.layout=org.apache.log4j.PatternLayout
log4j.appender.hubl.layout.ConversionPattern=%d{-MMM-dd 
HH:mm}%-5p%m%n

You may not want output in XML format, in which case again
go do some reading.
http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html  
(warning, long url)
provides the full story.

http://logging.apache.org/log4j/docs/manual.html is worth reading,
and I found
http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/log4j/log4j.html
 to be useful.


Perhaps the tomcat documentation might benefit from such a tiny inclusion?

HTH DaveP.


-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging in Tomcat 5.5

2005-03-18 Thread Jess Holle
I'm *guessing* you're facing some of the issues I have been.
I believe you'll essentially need to set up a separate LoggerRepository 
(based on classloader, not thread or contextual class loader) and 
provide separate config files for each.

I've got log4j.jar in my WEB-INF/lib, I'm using my own 
static/classloader-based LoggerRepository, and this keeps Tomcat's logs 
using their own LoggerRepository and a separate logging configuration.  
I'm still not to where I want to be with this, but it's a far cry from 
the out-of-the-box mess that occurs with log4j and commons-logging.

--
Jess Holle
Joy Kenneth Harry wrote:
Hi,
I have a webapp in tomcat. I am using a separate Log4j.xml for it, in
its WEB-INF classes folder.
I've also put a Log4j.xml in TOMCAT_HOME/ common/classes and set it to
false so that I do not get the general Tomcat logs.
But even then my project logs are getting mixed with the TOMCAT logs.
Is there any way to disable TOMCAT logs.
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Logging in Tomcat 5.5

2005-03-17 Thread Simon Kitching
On Fri, 2005-03-18 at 11:25 +0530, Joy Kenneth Harry wrote:
> Hi,
> I have a webapp in tomcat. I am using a separate Log4j.xml for it, in
> its WEB-INF classes folder.
> 
> I've also put a Log4j.xml in TOMCAT_HOME/ common/classes and set it to
> false so that I do not get the general Tomcat logs.
> 
> But even then my project logs are getting mixed with the TOMCAT logs.
> Is there any way to disable TOMCAT logs.

By "project logs" do you mean messages deliberately logged by the code
within *your webapp*, or do you mean messages from tomcat itself?

If you are talking about messages logged by code within your webapp, is
it using the log4j API or the commons-logging API?


Regards,

Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging in Tomcat 5.5

2005-03-17 Thread Joy Kenneth Harry

Hi,
I have a webapp in tomcat. I am using a separate Log4j.xml for it, in
its WEB-INF classes folder.

I've also put a Log4j.xml in TOMCAT_HOME/ common/classes and set it to
false so that I do not get the general Tomcat logs.

But even then my project logs are getting mixed with the TOMCAT logs.
Is there any way to disable TOMCAT logs.



Joy Kenneth





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging in Tomcat 5.5

2005-03-17 Thread Joy Kenneth Harry
Hi,
I have a webapp in tomcat. I am using a separate Log4j.xml for it, in
its WEB-INF classes folder.

I've also put a Log4j.xml in TOMCAT_HOME/ common/classes and set it to
false so that I do not get the general Tomcat logs.

But even then my project logs are getting mixed with the TOMCAT logs.
Is there any way to disable TOMCAT logs.



Joy Kenneth




How to Switch of logging in Tomcat 5.5

2005-03-17 Thread Joy Kenneth Harry



Re: exception logging in tomcat 5.5

2005-02-07 Thread David Smith
Standard out in tomcat is usually redirected to a file 'catalina.out' in 
the logs directory of tomcat.

--David
Christian Sell wrote:
Hello,
I just installed Tomcat 5.5.7 and ran my first webapp. I was rather disturbed
that exception information only appeared on the default error page, but nowhere
in the logs! In fact, in the out-of-the-box install, there were no logs written
at all!
I went through the docs and found a description of a rather complicated
configuration process that would supposedly bring back the normal log (it
involves copying 2 jar files and creating and copying one property file to the
tomcat/common directory).
However, since the docs say that stack trace info is written to stdout only, my
hopes are not high for success with this - I thought I would rather go ask
here. As I said, uncaught exceptions thrown from within my webapp (different
places, e.g. a servlet filter) are not written to stdout (if that is what I see
on the console). They only appear on the exception page - which is the one
place where I dont need them on the long run.
Can anyone help? Why has this been done?
thanks,
Christian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


exception logging in tomcat 5.5

2005-02-07 Thread Christian Sell
Hello,

I just installed Tomcat 5.5.7 and ran my first webapp. I was rather disturbed
that exception information only appeared on the default error page, but nowhere
in the logs! In fact, in the out-of-the-box install, there were no logs written
at all!

I went through the docs and found a description of a rather complicated
configuration process that would supposedly bring back the normal log (it
involves copying 2 jar files and creating and copying one property file to the
tomcat/common directory).
However, since the docs say that stack trace info is written to stdout only, my
hopes are not high for success with this - I thought I would rather go ask
here. As I said, uncaught exceptions thrown from within my webapp (different
places, e.g. a servlet filter) are not written to stdout (if that is what I see
on the console). They only appear on the exception page - which is the one
place where I dont need them on the long run.

Can anyone help? Why has this been done?

thanks,
Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: more logging in tomcat 5.5

2004-12-04 Thread Bill Barker

"Jeff Ousley" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> hello!
>
> forgive the rambling nature of this message. my basic question is how
> do i get more detailed logging out of tomcat. i'm trying to set up a
> JNDIRealm to authenticate to an ldap server. in my realm config i've
> got the debug="99" name/value pair. my realm is included inside my
> host container. i see no debug output anywhere. where should i see
> this output?
>

The 'debug' attribute has been removed in 5.5, and so is simply quietly 
ignored.

> i also have an accesslog valve inside the host container like this:
>
>  prefix="localhost_access_log." suffix=".out"
>  pattern="combined"/>
>
>
> the localhost_access_log... files are being created with very minimal
> information in them. is this where the debug output from the realm
> should go, or in the catalina.out directory?
>
> i've also followed the steps exactly to try and configure log4j as found 
> here:
>
> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html
>
> after stopping and restarting tomcat, my log4j settings seem to have
> made no difference. they don't seem to be working at all. my log file
> as specified in the log4j.properties file is not being created. is
> there something further i must do to get this working?
>

To configure Tomcat logging via log4j, you need to download commons-logging, 
and copy commons-logging.jar (*not* commons-logging-api.jar) to 
$CATALINA_HOME/common/lib.

> is there anything i can do to get more detailed logging out of tomcat
> and especially my realm config?
>
> sorry for the mess of questions. i appreciate any help, direction, or 
> guidance!
>
> -jeff 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



more logging in tomcat 5.5

2004-12-04 Thread Jeff Ousley
hello!

forgive the rambling nature of this message. my basic question is how
do i get more detailed logging out of tomcat. i'm trying to set up a
JNDIRealm to authenticate to an ldap server. in my realm config i've
got the debug="99" name/value pair. my realm is included inside my
host container. i see no debug output anywhere. where should i see
this output?

i also have an accesslog valve inside the host container like this:




the localhost_access_log... files are being created with very minimal
information in them. is this where the debug output from the realm
should go, or in the catalina.out directory?

i've also followed the steps exactly to try and configure log4j as found here:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html

after stopping and restarting tomcat, my log4j settings seem to have
made no difference. they don't seem to be working at all. my log file
as specified in the log4j.properties file is not being created. is
there something further i must do to get this working?

is there anything i can do to get more detailed logging out of tomcat
and especially my realm config?

sorry for the mess of questions. i appreciate any help, direction, or guidance!

-jeff

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Use of Apache Commons Logging in Tomcat

2004-05-21 Thread Shapira, Yoav

Hi,
This might help:
http://jakarta.apache.org/tomcat/faq/misc.html#commonsLoggingLog4j

Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: Hut Carspecken [mailto:[EMAIL PROTECTED]
>Sent: Thursday, May 20, 2004 5:52 PM
>To: [EMAIL PROTECTED]
>Subject: Use of Apache Commons Logging in Tomcat
>
>Hello There,
>
>I have a particular problem that someone may have seen before.  I am
>writing a web service using
>Apache Axis 1.1 and I want to use Apache Commons to do my logging.  I
am
>using Apache Commons in
>the correct manner
>import org.apache.commons.logging.Log
>org.apache.axis.components.logger.LogFactory
>
>and then make an instance with the following line:
>
>private static Log log = LogFactory.getLog(MyClass.class.getName())
>
>My problem is manipulating the log file configuration.  I can't find
the
>log4j.properties which is
>responsible for changing how the logging works.  Also how does
>org.apache.catalina.logger.FileLogger work so I can call different
levels
>of traces? I am pretty
>sure that FileLogger is connected to Apache Commons Logging.
>
>Thanks!
>Hut
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Use of Apache Commons Logging in Tomcat

2004-05-20 Thread Hut Carspecken
Hello There,

I have a particular problem that someone may have seen before.  I am writing a web 
service using
Apache Axis 1.1 and I want to use Apache Commons to do my logging.  I am using Apache 
Commons in
the correct manner 
import org.apache.commons.logging.Log
org.apache.axis.components.logger.LogFactory

and then make an instance with the following line: 

private static Log log = LogFactory.getLog(MyClass.class.getName())

My problem is manipulating the log file configuration.  I can't find the 
log4j.properties which is
responsible for changing how the logging works.  Also how does
org.apache.catalina.logger.FileLogger work so I can call different levels of traces? I 
am pretty
sure that FileLogger is connected to Apache Commons Logging.

Thanks!
Hut

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: log4j logging in Tomcat WAS: Clustering with 5.0.19

2004-05-06 Thread Sam Lawrence
Thanks Filip,

I got some logging, but far more than is useful to try and debug what
session replication is going on. If I switch to a recent (nightly?) build,
will I be able to add debugging specifically for the clustering? (by adding
a Logger child element to Cluster in server.xml?)

Up to now I've been trying to see what's going on by watching the
replication packets over the network. I added a custom
HttpSessionAttributeListener/HttpSessionListener to my webapp (via a
listener element in my web.xml) and I'm not seeing any session events
although I am seeing replication data being passed between the two servers.
I'm using the DeltaManager so my assumption was that I shouldn't be. Any
ideas? Please let me know what other info would be useful to paint a more
complete picture!

Sam.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: 05 May 2004 16:48
To: Tomcat Users List
Subject: log4j logging in Tomcat WAS: Clustering with 5.0.19


you need to enable it at the logger level,
the code is currently logging with Log.info/Log.debug etc

You can make is use log4j and do it using the log4j conf file
http://jakarta.apache.org/commons/logging/guide.html

To make some simple steps, I remember there was thread on this last week,
not sure if they got it to work so here are the steps, let me know if you
have problems

1. Download latest log4j package
2. Put the log4j-1.2.8.jar (or whatever name it is) in your
$CATALINA_HOME/bin
3. In catalina.sh/catalina.bat add the log4j to the system classpath
4. in catalina.sh/catalina.bat, on the top add the JAVA_OPTS setting like
this
JAVA_OPTS="-Dlog4j.debug -Dlogj4.configuration=$CATALINA_HOME/bin/log4j.prop
erties"
5. Put your log4j.properties file in CATALINA_HOME/bin

of course, if you are on windows you will need to change / for \ and $ for
%%
but I am sure you can figure that for yourself :)

Filip


- Original Message -
From: "Sam Lawrence" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 10:00 AM
Subject: RE: Clustering with 5.0.19


Thanks Filip,

Do you know if there is any way I can get some debug info from 5.0.19? I'd
feel happier going with a release build if possible.

Kind regards,

Sam.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: 05 May 2004 15:31
To: Tomcat Users List
Subject: Re: Clustering with 5.0.19


useDirtyFlag is not used with the DeltaManager, only with the
SimpleTcpReplicationManager.
As the name suggest, the DeltaManager only replicates deltas, and hence it
can only replicate when the session is dirty.

The clustering configuration has changed a little bit since 5.0.19, to make
it more modularized.
Also, the debug flag is a thing of the past, the clustering module is
currently using the commons logger, same way all the other
components are using it.

Filip

- Original Message -
From: "Sam Lawrence" <[EMAIL PROTECTED]>
To: "Tomcat" <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 9:26 AM
Subject: Clustering with 5.0.19


Hi,

I've successfully clustered two instances of Tomcat on different machines
and I'm now trying to do some fine tuning on a struts based site.

I want to make sure that the session is only being replicated when it needs
to be. I have useDirtyFlag="true" although I'm not sure that it isn't still
being re-sent after every request. I have the following Cluster element in
my server.xml -



Although I have the debug/printToScreen attributes, I'm not seeing any debug
information about session replication. How can I get some debug info?

Any help greatly appreciated!

Thanks,

Sam Lawrence


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



log4j logging in Tomcat WAS: Clustering with 5.0.19

2004-05-05 Thread Filip Hanik - Dev
you need to enable it at the logger level,
the code is currently logging with Log.info/Log.debug etc

You can make is use log4j and do it using the log4j conf file
http://jakarta.apache.org/commons/logging/guide.html

To make some simple steps, I remember there was thread on this last week,
not sure if they got it to work so here are the steps, let me know if you have problems

1. Download latest log4j package
2. Put the log4j-1.2.8.jar (or whatever name it is) in your $CATALINA_HOME/bin
3. In catalina.sh/catalina.bat add the log4j to the system classpath 
4. in catalina.sh/catalina.bat, on the top add the JAVA_OPTS setting like this
JAVA_OPTS="-Dlog4j.debug -Dlogj4.configuration=$CATALINA_HOME/bin/log4j.properties"
5. Put your log4j.properties file in CATALINA_HOME/bin

of course, if you are on windows you will need to change / for \ and $ for %%
but I am sure you can figure that for yourself :)

Filip


- Original Message - 
From: "Sam Lawrence" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 10:00 AM
Subject: RE: Clustering with 5.0.19


Thanks Filip,

Do you know if there is any way I can get some debug info from 5.0.19? I'd
feel happier going with a release build if possible.

Kind regards,

Sam.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: 05 May 2004 15:31
To: Tomcat Users List
Subject: Re: Clustering with 5.0.19


useDirtyFlag is not used with the DeltaManager, only with the
SimpleTcpReplicationManager.
As the name suggest, the DeltaManager only replicates deltas, and hence it
can only replicate when the session is dirty.

The clustering configuration has changed a little bit since 5.0.19, to make
it more modularized.
Also, the debug flag is a thing of the past, the clustering module is
currently using the commons logger, same way all the other
components are using it.

Filip

- Original Message -
From: "Sam Lawrence" <[EMAIL PROTECTED]>
To: "Tomcat" <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 9:26 AM
Subject: Clustering with 5.0.19


Hi,

I've successfully clustered two instances of Tomcat on different machines
and I'm now trying to do some fine tuning on a struts based site.

I want to make sure that the session is only being replicated when it needs
to be. I have useDirtyFlag="true" although I'm not sure that it isn't still
being re-sent after every request. I have the following Cluster element in
my server.xml -



Although I have the debug/printToScreen attributes, I'm not seeing any debug
information about session replication. How can I get some debug info?

Any help greatly appreciated!

Thanks,

Sam Lawrence


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: log4j fighting with Commons-Logging in Tomcat 4.1

2003-07-25 Thread Shapira, Yoav

Howdy,
Don't put anything in common/lib or common/classes.  Put the log4j jar
in the WEB-INF/lib directory of your webapp.  Put the log4j
configuration file in the WEB-INF/classes directory of your webapp.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Mike McCown [mailto:[EMAIL PROTECTED]
>Sent: Thursday, July 24, 2003 7:17 PM
>To: [EMAIL PROTECTED]
>Subject: log4j fighting with Commons-Logging in Tomcat 4.1
>
>Not sure if this is a Tomcat or Commons-logging question, but it seems
>to be an issue of how Tomcat uses logging, so I'm asking here.
>
>I just started using Tomcat 4.1 (moving from another server).  My apps
>were all coded to use the Log4j logger (1.2.8). Here's my problem.
>
>When starting up, Tomcat apparently uses commons-logging.jar (actually,
>it first uses commons-logging-api.jar??).  It creates a default console
>appender for my loggers in a format I hate ("milliseconds-since-start
>[Thread-x] LEVEL category - text").  Now, my log4j.properties file,
>which I've put into the $CATALINA_HOME/common/classes directory, also
>sets up a console appender (in a format I like).  Both of these
>appenders now write to the console, so I get 2 lines for each logger
>entry.
>
>Question:  How the heck do I get rid of (or change the format of) the
>default console appender that Tomcat creates??
>
>(Sorry if this is obvious - I've searched the FAQs, RTFM'd, and moved
>properties and jar files all over the place, but I *cannot* figure this
>out!!)
>
>Mike
>
>
>
>The information in this email may be confidential and/or privileged.
This
>email is intended to be reviewed by only the individual(s) or
>organization(s) named above.  If you are not an intended recipient,
then
>any review, dissemination or copying of this email, any attachments or
any
>information contained herein is prohibited.  If you have received this
>email in error, please immediately notify the sender by return email
and
>delete this email from your system.   This email and any
attachments
>are not intended to constitute an offer or acceptance and do not create
or
>evidence a contract or any amendment to a contract between Security
>Broadband and the intended recipient(s) or any other party.  This email
>and any attachments may not be relied on by anyone as the basis of a
>contract.  By sending this email, the sender does not consent to
conduct
>(by electronic means) any transactions that may be the subject of this
>email.  Any such consent must be separately and expressly obtained in
>writing manually executed by an authorized representative of Security
>Broadband.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



log4j fighting with Commons-Logging in Tomcat 4.1

2003-07-24 Thread Mike McCown
Not sure if this is a Tomcat or Commons-logging question, but it seems
to be an issue of how Tomcat uses logging, so I'm asking here.

I just started using Tomcat 4.1 (moving from another server).  My apps
were all coded to use the Log4j logger (1.2.8). Here's my problem.

When starting up, Tomcat apparently uses commons-logging.jar (actually,
it first uses commons-logging-api.jar??).  It creates a default console
appender for my loggers in a format I hate ("milliseconds-since-start
[Thread-x] LEVEL category - text").  Now, my log4j.properties file,
which I've put into the $CATALINA_HOME/common/classes directory, also
sets up a console appender (in a format I like).  Both of these
appenders now write to the console, so I get 2 lines for each logger
entry.

Question:  How the heck do I get rid of (or change the format of) the
default console appender that Tomcat creates??

(Sorry if this is obvious - I've searched the FAQs, RTFM'd, and moved
properties and jar files all over the place, but I *cannot* figure this
out!!)

Mike



The information in this email may be confidential and/or privileged.  This
email is intended to be reviewed by only the individual(s) or
organization(s) named above.  If you are not an intended recipient, then
any review, dissemination or copying of this email, any attachments or any
information contained herein is prohibited.  If you have received this
email in error, please immediately notify the sender by return email and
delete this email from your system.   This email and any attachments
are not intended to constitute an offer or acceptance and do not create or
evidence a contract or any amendment to a contract between Security
Broadband and the intended recipient(s) or any other party.  This email
and any attachments may not be relied on by anyone as the basis of a
contract.  By sending this email, the sender does not consent to conduct
(by electronic means) any transactions that may be the subject of this
email.  Any such consent must be separately and expressly obtained in
writing manually executed by an authorized representative of Security
Broadband.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging in Tomcat

2003-07-09 Thread Norris Shelton
What you want to use is the Logger instance that is defined for
this context via your server.xml

 From a servlet,
 getServletContext().log("theMessage");

 Thanks go to Yoav Shapira
 Millennium ChemInformatics

The catalina_log file is the Logger element under the "Catalina"
element.

The localhost_log is the Logger element under "localhost" Host
element.

The localhost_examples_log is the Logger element under the
"examples" Context element.


All of these rotate daily (hence the date in the name).  These
can be inherited.  See also
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html


--- James Darwin <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I've got a website running on Tomcat 4.1.18. It logs all
> System.out.println to catalina.out. However, this file is
> getting too
> long, making it difficult to view the file. So, I would like
> to
> generate a separate log file for each day. Is this possible to
> configure under Tomcat?
> 
> Also, under tomcat-4.1.18/logs I have a whole heap of other
> files, e.g:
> 
> catalina_log.2003-07-07.txt
> localhost_log.2003-04-07.txt
> localhost_examples_log.2003-02-28.txt
> 
> What are these log files used for? I've searched around Tomcat
> website,
> but there doesn't seem to be any information on the default
> logging
> behaviour of Tomcat. If anyone knows of any good documents or
> websites
> which explain Tomcat logging it would be much appreciated if
> you pass
> it on.
> 
> Thanks.
> 
> http://mobile.yahoo.com.au - Yahoo! Mobile
> - Check & compose your email via SMS on your Telstra or
> Vodafone mobile.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging in Tomcat

2003-07-07 Thread James Darwin
Hi,

I've got a website running on Tomcat 4.1.18. It logs all
System.out.println to catalina.out. However, this file is getting too
long, making it difficult to view the file. So, I would like to
generate a separate log file for each day. Is this possible to
configure under Tomcat?

Also, under tomcat-4.1.18/logs I have a whole heap of other files, e.g:

catalina_log.2003-07-07.txt
localhost_log.2003-04-07.txt
localhost_examples_log.2003-02-28.txt

What are these log files used for? I've searched around Tomcat website,
but there doesn't seem to be any information on the default logging
behaviour of Tomcat. If anyone knows of any good documents or websites
which explain Tomcat logging it would be much appreciated if you pass
it on.

Thanks.

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FAQ? JDK 1.4 Logging in Tomcat - long and discussive

2003-06-16 Thread Bill Barker

"Yoav Shapira" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Howdy,
> You haven't missed something simple.  In fact, I'd venture you've spent
more
> time and thought (and reached better conclusions and solutions) that most
> people who've considered the problem.
>
> Ditch JDK 1.4 logging.  Use log4j.  Everything you want here can be done
using
> log4j's Repository Selector: and it's even done for you for a
webapp/context
> environment such as tomcat in Jacob Kjome's servlet context repository
> selector, currently available in the log4j sandbox and slated for
inclusion in
> log4j 1.2.x.

And I wasted all that time writing a repository selector for TC 3.3 ;-(.
I'll take a look at Jacob's stuff.  It was going to be my next project to
port the 3.3 repository selector to TC 4.1.x/5.x, but if it has already been
done.

Of course, the same sort of thing could be done for JDK1.4 Logging if anyone
was motivated enough.  Patches are always welcome ;-).

>
> Yoav Shapira
>
> --- Tim Shaw <[EMAIL PROTECTED]> wrote:
> > Feedback welcome - I've been working on this without much help, and
> > others may well have more experience (which I'd like to benefit from
too).
> > I would love to use a better approach than that described here ...
> >
> > I needed to be able to log my various (multiple-context) web apps. As I
> > couldn't get commons-logging to work with the JDK 1.4 logging, I went
> > the 'direct' route ... and it turns out it wasn't the commons-logging
> > that was the 'problem'. 'Logging' below refers to the JDK 1.4
> > java.util.logging facility ...
> >
> > Most of the stuff on the web just takes you through the api, and shows
> > how easy it is to get logging to work.
> > That's fine - it actually is fairly easy to program to.
> >
> > However ...
> >
> > Running Tomcat, I wanted multiple applications logging to different
> > areas (files and/or db etc), and I started to run into difficult
behaviour.
> >
> > The problem I had was to load my logging configurations into the
> > LogManager - not the mechanism, but the practice. This is a singleton,
> > within the scope of the bootstrap class loader. Consequently, the same
> > object is shared across all contexts (and Tomcat itself). This means
> > that resetting it and then loading an app-specific config file is not an
> > option. Loading an app-specific properties file is an option (via
> > getResourceAsStream), but that has the further restriction that each
> > web-app has to have a distinct namespace (see below). The properties
> > file is not very functional anyway - it specifies defaults for defaults!
> >
> > There is a 'config' option, which allows you to specify a Class for
> > logging initialisation ... but this class has to be accessible from the
> > bootstrap loader (common/lib, shared/lib ... nope! - it's gotta be in
> > jre/lib/ext).
> >
> > Ideally, I would like to be able to supply an app-specific logging
> > configuration file as part of the deployment of my web-app. Potentially,
> > this could be done by loading a data-file from the context and
> > interpreting it to provide the appropriate logging structure (loggers,
> > handlers etc).
> >
> > But ... I have controller servlets in different contexts extending the
> > same class from a 'utility' jar (implementing the Command pattern for
> > Servlets). Most of the code is in the super-class (action class
> > retrieval/activation etc).
> > Following the logging examples, using the class name as the logging
> > context, and making the log variable visible (protected) down to the
> > sub-classes, I end up with multiple log files (logging expands the %u to
> > provide a unique filename when it can't open[?] the file ... I don't
> > even want to guess what it does when the %u isn't given).
> > Additionally, I can't find a way to determine whether the logging had
> > been initialised for a given context.
> > This means that (IMHO) utility classes cannot log!
> >
> > I have ended up by extending the logging.properties mechanism, in the
> > time-honoured way, by adding '.' separated properties for each
> > logging-context :
> > eg .handler.level = INFO
> > .handler.class = com.xxx..DBHandler
> > etc
> > These are then added into the (system-wide) logging.properties file, and
> > the Class which interprets them is specified in the config and has to be
> > jar'd into the jre/lib/ext.
> > Additionally, I have removed all logging-system stuff from my utility
> > classes. I only get a Logger when I have a sufficiently unique path to
> > guarantee no conflicts.
> >
> > This gives me the flexibility I need to log multiple apps in an
> > appserver (tomcat) environment ... but I'm not very happy with it. It
> > could be refactored to allow each context's Controller to load their own
> > properties, and then interpret those (on my list of things to do), but
> > this relies on calling a log-initialisation routine ... not something I
> > want to do within 'client' JSP's (which live in another c

Re: FAQ? JDK 1.4 Logging in Tomcat - long and discussive

2003-06-16 Thread Yoav Shapira
Howdy,
You haven't missed something simple.  In fact, I'd venture you've spent more
time and thought (and reached better conclusions and solutions) that most
people who've considered the problem.

Ditch JDK 1.4 logging.  Use log4j.  Everything you want here can be done using
log4j's Repository Selector: and it's even done for you for a webapp/context
environment such as tomcat in Jacob Kjome's servlet context repository
selector, currently available in the log4j sandbox and slated for inclusion in
log4j 1.2.x.

Yoav Shapira

--- Tim Shaw <[EMAIL PROTECTED]> wrote:
> Feedback welcome - I've been working on this without much help, and 
> others may well have more experience (which I'd like to benefit from too).
> I would love to use a better approach than that described here ...
> 
> I needed to be able to log my various (multiple-context) web apps. As I 
> couldn't get commons-logging to work with the JDK 1.4 logging, I went 
> the 'direct' route ... and it turns out it wasn't the commons-logging 
> that was the 'problem'. 'Logging' below refers to the JDK 1.4 
> java.util.logging facility ...
> 
> Most of the stuff on the web just takes you through the api, and shows 
> how easy it is to get logging to work.
> That's fine - it actually is fairly easy to program to.
> 
> However ...
> 
> Running Tomcat, I wanted multiple applications logging to different 
> areas (files and/or db etc), and I started to run into difficult behaviour.
> 
> The problem I had was to load my logging configurations into the 
> LogManager - not the mechanism, but the practice. This is a singleton, 
> within the scope of the bootstrap class loader. Consequently, the same 
> object is shared across all contexts (and Tomcat itself). This means 
> that resetting it and then loading an app-specific config file is not an 
> option. Loading an app-specific properties file is an option (via 
> getResourceAsStream), but that has the further restriction that each 
> web-app has to have a distinct namespace (see below). The properties 
> file is not very functional anyway - it specifies defaults for defaults!
> 
> There is a 'config' option, which allows you to specify a Class for 
> logging initialisation ... but this class has to be accessible from the 
> bootstrap loader (common/lib, shared/lib ... nope! - it's gotta be in 
> jre/lib/ext).
> 
> Ideally, I would like to be able to supply an app-specific logging 
> configuration file as part of the deployment of my web-app. Potentially, 
> this could be done by loading a data-file from the context and 
> interpreting it to provide the appropriate logging structure (loggers, 
> handlers etc).
> 
> But ... I have controller servlets in different contexts extending the 
> same class from a 'utility' jar (implementing the Command pattern for 
> Servlets). Most of the code is in the super-class (action class 
> retrieval/activation etc).
> Following the logging examples, using the class name as the logging 
> context, and making the log variable visible (protected) down to the 
> sub-classes, I end up with multiple log files (logging expands the %u to 
> provide a unique filename when it can't open[?] the file ... I don't 
> even want to guess what it does when the %u isn't given).
> Additionally, I can't find a way to determine whether the logging had 
> been initialised for a given context.
> This means that (IMHO) utility classes cannot log!
> 
> I have ended up by extending the logging.properties mechanism, in the 
> time-honoured way, by adding '.' separated properties for each 
> logging-context :
> eg .handler.level = INFO
> .handler.class = com.xxx..DBHandler
> etc
> These are then added into the (system-wide) logging.properties file, and 
> the Class which interprets them is specified in the config and has to be 
> jar'd into the jre/lib/ext.
> Additionally, I have removed all logging-system stuff from my utility 
> classes. I only get a Logger when I have a sufficiently unique path to 
> guarantee no conflicts.
> 
> This gives me the flexibility I need to log multiple apps in an 
> appserver (tomcat) environment ... but I'm not very happy with it. It 
> could be refactored to allow each context's Controller to load their own 
> properties, and then interpret those (on my list of things to do), but 
> this relies on calling a log-initialisation routine ... not something I 
> want to do within 'client' JSP's (which live in another context). I have 
> put JSP's into a different package (component separation - no problem), 
> so the current setup allows me to specify that package as a root for 
> which logging is enabled ... but this would not work without 
> initialisation code unless I used the 'config' class approach.
> 
> An additional restriction is still that I cannot log directly from the 
> utility super-class. I have to create log variables at the concrete level.
> 
> Summary : I don't think jdk 1.4 logging has come of age - it's nice and 
> simple from the API POV ... but in r

FAQ? JDK 1.4 Logging in Tomcat - long and discussive

2003-06-16 Thread Tim Shaw
Feedback welcome - I've been working on this without much help, and 
others may well have more experience (which I'd like to benefit from too).
I would love to use a better approach than that described here ...

I needed to be able to log my various (multiple-context) web apps. As I 
couldn't get commons-logging to work with the JDK 1.4 logging, I went 
the 'direct' route ... and it turns out it wasn't the commons-logging 
that was the 'problem'. 'Logging' below refers to the JDK 1.4 
java.util.logging facility ...

Most of the stuff on the web just takes you through the api, and shows 
how easy it is to get logging to work.
That's fine - it actually is fairly easy to program to.

However ...

Running Tomcat, I wanted multiple applications logging to different 
areas (files and/or db etc), and I started to run into difficult behaviour.

The problem I had was to load my logging configurations into the 
LogManager - not the mechanism, but the practice. This is a singleton, 
within the scope of the bootstrap class loader. Consequently, the same 
object is shared across all contexts (and Tomcat itself). This means 
that resetting it and then loading an app-specific config file is not an 
option. Loading an app-specific properties file is an option (via 
getResourceAsStream), but that has the further restriction that each 
web-app has to have a distinct namespace (see below). The properties 
file is not very functional anyway - it specifies defaults for defaults!

There is a 'config' option, which allows you to specify a Class for 
logging initialisation ... but this class has to be accessible from the 
bootstrap loader (common/lib, shared/lib ... nope! - it's gotta be in 
jre/lib/ext).

Ideally, I would like to be able to supply an app-specific logging 
configuration file as part of the deployment of my web-app. Potentially, 
this could be done by loading a data-file from the context and 
interpreting it to provide the appropriate logging structure (loggers, 
handlers etc).

But ... I have controller servlets in different contexts extending the 
same class from a 'utility' jar (implementing the Command pattern for 
Servlets). Most of the code is in the super-class (action class 
retrieval/activation etc).
Following the logging examples, using the class name as the logging 
context, and making the log variable visible (protected) down to the 
sub-classes, I end up with multiple log files (logging expands the %u to 
provide a unique filename when it can't open[?] the file ... I don't 
even want to guess what it does when the %u isn't given).
Additionally, I can't find a way to determine whether the logging had 
been initialised for a given context.
This means that (IMHO) utility classes cannot log!

I have ended up by extending the logging.properties mechanism, in the 
time-honoured way, by adding '.' separated properties for each 
logging-context :
eg .handler.level = INFO
   .handler.class = com.xxx..DBHandler
etc
These are then added into the (system-wide) logging.properties file, and 
the Class which interprets them is specified in the config and has to be 
jar'd into the jre/lib/ext.
Additionally, I have removed all logging-system stuff from my utility 
classes. I only get a Logger when I have a sufficiently unique path to 
guarantee no conflicts.

This gives me the flexibility I need to log multiple apps in an 
appserver (tomcat) environment ... but I'm not very happy with it. It 
could be refactored to allow each context's Controller to load their own 
properties, and then interpret those (on my list of things to do), but 
this relies on calling a log-initialisation routine ... not something I 
want to do within 'client' JSP's (which live in another context). I have 
put JSP's into a different package (component separation - no problem), 
so the current setup allows me to specify that package as a root for 
which logging is enabled ... but this would not work without 
initialisation code unless I used the 'config' class approach.

An additional restriction is still that I cannot log directly from the 
utility super-class. I have to create log variables at the concrete level.

Summary : I don't think jdk 1.4 logging has come of age - it's nice and 
simple from the API POV ... but in real world usage it's lacking.

Please tell me I've missed something simple ;-)

tim



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Half the logging in tomcat-4.1.12

2002-11-04 Thread Michael
Thanks for your help.

Unfortunately this hasn´t quite solved the problem.  I´m actually using
log4j for outputting to the console and to its own log-file
respectively.

Before updating to tomcat 4.1.12 form 4.0.4 this worked without a
problem.  Now, I´m not getting any log messages in my console, nor in my
log file.

Regards,

Michael


-Original Message-
From: neal [mailto:nealcabage@;yahoo.com] 
Sent: Sonntag, 3. November 2002 23:24
To: Tomcat Users List
Subject: RE: Half the logging in tomcat-4.1.12

I'd guess it all depends on the stage you're at in the project.  While
developing/deploying I'd set it a lot higher than when simply
maintaining
it.  Of course the range is 0-9.  I would guess most people probably set
it
somewhere between 3-5 (??).  I don't know if this would completely
explain
what happened to your logs but it was a thought.

Good luck
Neal

-Original Message-
From: Michael [mailto:home@;michael-delamere.de]
Sent: Monday, November 04, 2002 2:05 AM
To: 'Tomcat Users List'
Subject: RE: Half the logging in tomcat-4.1.12


I don´t know to be honest.  What would be the ideal debug-level setting?
I.e. one that gives me both the log-output from my application and the
output from my service.jar which I have placed in the common-lib folder.

Thanks in advance.

Regards,

Michael


-Original Message-
From: neal [mailto:nealcabage@;yahoo.com]
Sent: Sonntag, 3. November 2002 22:55
To: Tomcat Users List
Subject: RE: Half the logging in tomcat-4.1.12

Was your debug setting for the Host in your server.xml file affected
during
the upgrade?


-Original Message-
From: Michael Delamere [mailto:mdelamere@;morelogs.de]
Sent: Monday, November 04, 2002 1:28 AM
To: [EMAIL PROTECTED]
Subject: Half the logging in tomcat-4.1.12


Hi,

I recently upgraded from tomcat4.0.4 to tomcat4.1.12.  Could someone
please tell me why I am only getting half the logging now.  It appears
that I am only seeing the logging output from my application in my
WEB-INF folder and not the logging from my jar-file which I have placed
in the tomcat-common-lib directory.

Any help would be very appreciated.

Thanks in advance,

Michael


http://www.michael-delamere.de
Software Engineer


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


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


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


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


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




RE: Half the logging in tomcat-4.1.12

2002-11-04 Thread neal
I'd guess it all depends on the stage you're at in the project.  While
developing/deploying I'd set it a lot higher than when simply maintaining
it.  Of course the range is 0-9.  I would guess most people probably set it
somewhere between 3-5 (??).  I don't know if this would completely explain
what happened to your logs but it was a thought.

Good luck
Neal

-Original Message-
From: Michael [mailto:home@;michael-delamere.de]
Sent: Monday, November 04, 2002 2:05 AM
To: 'Tomcat Users List'
Subject: RE: Half the logging in tomcat-4.1.12


I don´t know to be honest.  What would be the ideal debug-level setting?
I.e. one that gives me both the log-output from my application and the
output from my service.jar which I have placed in the common-lib folder.

Thanks in advance.

Regards,

Michael


-Original Message-
From: neal [mailto:nealcabage@;yahoo.com]
Sent: Sonntag, 3. November 2002 22:55
To: Tomcat Users List
Subject: RE: Half the logging in tomcat-4.1.12

Was your debug setting for the Host in your server.xml file affected
during
the upgrade?


-Original Message-
From: Michael Delamere [mailto:mdelamere@;morelogs.de]
Sent: Monday, November 04, 2002 1:28 AM
To: [EMAIL PROTECTED]
Subject: Half the logging in tomcat-4.1.12


Hi,

I recently upgraded from tomcat4.0.4 to tomcat4.1.12.  Could someone
please tell me why I am only getting half the logging now.  It appears
that I am only seeing the logging output from my application in my
WEB-INF folder and not the logging from my jar-file which I have placed
in the tomcat-common-lib directory.

Any help would be very appreciated.

Thanks in advance,

Michael


http://www.michael-delamere.de
Software Engineer


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


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


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


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




RE: Half the logging in tomcat-4.1.12

2002-11-04 Thread Michael
I don´t know to be honest.  What would be the ideal debug-level setting?
I.e. one that gives me both the log-output from my application and the
output from my service.jar which I have placed in the common-lib folder.

Thanks in advance.

Regards,

Michael


-Original Message-
From: neal [mailto:nealcabage@;yahoo.com] 
Sent: Sonntag, 3. November 2002 22:55
To: Tomcat Users List
Subject: RE: Half the logging in tomcat-4.1.12

Was your debug setting for the Host in your server.xml file affected
during
the upgrade?


-Original Message-
From: Michael Delamere [mailto:mdelamere@;morelogs.de]
Sent: Monday, November 04, 2002 1:28 AM
To: [EMAIL PROTECTED]
Subject: Half the logging in tomcat-4.1.12


Hi,

I recently upgraded from tomcat4.0.4 to tomcat4.1.12.  Could someone
please tell me why I am only getting half the logging now.  It appears
that I am only seeing the logging output from my application in my
WEB-INF folder and not the logging from my jar-file which I have placed
in the tomcat-common-lib directory.

Any help would be very appreciated.

Thanks in advance,

Michael


http://www.michael-delamere.de
Software Engineer


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


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


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




RE: Half the logging in tomcat-4.1.12

2002-11-04 Thread neal
Was your debug setting for the Host in your server.xml file affected during
the upgrade?


-Original Message-
From: Michael Delamere [mailto:mdelamere@;morelogs.de]
Sent: Monday, November 04, 2002 1:28 AM
To: [EMAIL PROTECTED]
Subject: Half the logging in tomcat-4.1.12


Hi,

I recently upgraded from tomcat4.0.4 to tomcat4.1.12.  Could someone
please tell me why I am only getting half the logging now.  It appears
that I am only seeing the logging output from my application in my
WEB-INF folder and not the logging from my jar-file which I have placed
in the tomcat-common-lib directory.

Any help would be very appreciated.

Thanks in advance,

Michael


http://www.michael-delamere.de
Software Engineer


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


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




Half the logging in tomcat-4.1.12

2002-11-04 Thread Michael Delamere
Hi,

I recently upgraded from tomcat4.0.4 to tomcat4.1.12.  Could someone
please tell me why I am only getting half the logging now.  It appears
that I am only seeing the logging output from my application in my
WEB-INF folder and not the logging from my jar-file which I have placed
in the tomcat-common-lib directory.

Any help would be very appreciated.

Thanks in advance,

Michael


http://www.michael-delamere.de
Software Engineer


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: configuring access and event logging in Tomcat 4.0

2002-10-24 Thread Shapira, Yoav
Hi,

> I am using my own logger(logger.jar file used in many
> projects , in fact)
> to log the different types of events[in the servlets and Java
> beans that I
> have used.].
> However , somehow my logger does not write logs although it
> creates the log
> file every day(my logger rotates daily.)

Since it's your logger, how would any of us know its code?  It's hard to
help without knowing anything about this logger ;)

> any one can help me to configure the logger of Tomcat?It is
> staying the
> default settings as I have set it up.(also, does it have any bugs?)

I'm sure the Loggers have some bugs ;)  But I haven't run across any
significant ones.  What, specifically, are you trying to do with the
Logger element that is not working?

Have you considered using a 3rd party logging framework, like log4j?

Yoav Shapira
Millennium ChemInformatics

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


configuring access and event logging in Tomcat 4.0

2002-10-24 Thread OZGUR KISIR

Hi all,
I have a web application that has a JDBC connection to a
 MySQL database.
 You can do any db operations from this application.

 I am using my own logger(logger.jar file used in many
 projects , in fact)
 to log the different types of events[in the servlets and Java
 beans that I
 have used.].
 However , somehow my logger does not write logs although it
 creates the log
 file every day(my logger rotates daily.)

 First of all,
 any one can help me to configure the logger of Tomcat?It is
 staying the
 default settings as I have set it up.(also, does it have any bugs?)

 with regards,
 Ozgur


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: request logging in Tomcat?

2001-09-14 Thread michael . brohl


Hi,

thanks for the reply. Is there any how-to or example on how to write and
plug in such a solution in Tomcat?

Regards

Michael Brohl





   

"Craig R.  

McClanahan"  To: <[EMAIL PROTECTED]>  

  Subject: Re: request logging in Tomcat?   

Sent by:   

   

   

   

13.09.2001 

18:00  

Please respond 

to tomcat-user 

   

   





By default, Tomcat 4 creates access log files for you in the same format
that web servers do.  It includes all of the stuff you are talking about.

Tomcat 3.x does not include this feature, although you could write it
yourself.

Craig McClanahan


On Thu, 13 Sep 2001 [EMAIL PROTECTED] wrote:

> Date: Thu, 13 Sep 2001 12:06:30 +0200
> From: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: request logging in Tomcat?
>
>
> Hi all,
>
> how can I set up Tomcat (standalone) for logging the incoming requests
> including request path,
> data/time and - very important - the IP and/or domain of the requester?
>
> I enabled all logging (Tomcat, Servlet, JSP and Context Manager) but I
> didn't get the IP from the
> requesting client. Any ideas?
>
> Regards
>
> Michael Brohl
>
>
>
>
>







RE: request logging in Tomcat?

2001-09-14 Thread Ignacio J. Ortega

Well, i dont know, not tried.., but probably not..

Saludos ,
Ignacio J. Ortega


> -Mensaje original-
> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Enviado el: viernes 14 de septiembre de 2001 9:53
> Para: [EMAIL PROTECTED]
> Asunto: RE: request logging in Tomcat?
> 
> 
> 
> Hi,
> 
> is this Interceptor compatible with Tomcat 3.2.x, and can I 
> use it with
> this version?
> Thanks for the hint!
> 
>  Regards
> 
> Michael Brohl
> 
> 
> 
> 
> 
>   
>  
> "Ignacio J.   
>  
> Ortega"  To: 
> "'[EMAIL PROTECTED]'"
> <[EMAIL PROTECTED]
> <[EMAIL PROTECTED]>  
>
> s>   cc:          
>  
>  Subject: RE: 
> request logging in Tomcat?   
> 13.09.2001
>  
> 22:13 
>  
> Please respond
>  
> to tomcat-user
>  
>   
>  
>   
>  
> 
> 
> 
> 
> Tomcat 3.3 has an "AccessLogInterceptor" ( disabled by default ) that
> will do the Job too..
> 
> 
> Saludos ,
> Ignacio J. Ortega
> 
> 



RE: request logging in Tomcat?

2001-09-14 Thread michael . brohl


Hi,

is this Interceptor compatible with Tomcat 3.2.x, and can I use it with
this version?
Thanks for the hint!

 Regards

Michael Brohl





   

"Ignacio J.

Ortega"  To: "'[EMAIL PROTECTED]'"

<[EMAIL PROTECTED]<[EMAIL PROTECTED]> 

s>   cc:   

         Subject: RE: request logging in Tomcat?   

13.09.2001 

22:13  

Please respond 

to tomcat-user 

   

   





Tomcat 3.3 has an "AccessLogInterceptor" ( disabled by default ) that
will do the Job too..


Saludos ,
Ignacio J. Ortega








RE: request logging in Tomcat?

2001-09-13 Thread Ignacio J. Ortega

Tomcat 3.3 has an "AccessLogInterceptor" ( disabled by default ) that
will do the Job too..


Saludos ,
Ignacio J. Ortega


> -Mensaje original-
> De: Schorsch Family [mailto:[EMAIL PROTECTED]]
> Enviado el: jueves 13 de septiembre de 2001 22:00
> Para: [EMAIL PROTECTED]
> Asunto: RE: request logging in Tomcat?
> 
> 
> yes i know, but as logging that he wanted is not available 
> with 3.x.x (as
> you pointed out) it is not much of a reach to add apache to 
> get the desired
> logs, i.e. An alternative to your suggestion to write the logging from
> scratch.
> 
> dave
> 
> -Original Message-
> From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
> R. McClanahan
> Sent: Thursday, September 13, 2001 2:27 PM
> To: [EMAIL PROTECTED]
> Subject: RE: request logging in Tomcat?
> 
> 
> 
> 
> On Thu, 13 Sep 2001, Schorsch Family wrote:
> 
> > Date: Thu, 13 Sep 2001 13:12:54 -0500
> > From: Schorsch Family <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: RE: request logging in Tomcat?
> >
> > I use the logging in Apache to monitor tomcat requests.
> >
> 
> That also works, of course.  But the original question was 
> about Tomcat
> stand alone.
> 
> > Dave
> >
> 
> Craig
> 
> > -Original Message-
> > From: craigmcc@localhost [mailto:craigmcc@localhost]On 
> Behalf Of Craig
> > R. McClanahan
> > Sent: Thursday, September 13, 2001 11:01 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: request logging in Tomcat?
> >
> >
> > By default, Tomcat 4 creates access log files for you in 
> the same format
> > that web servers do.  It includes all of the stuff you are 
> talking about.
> >
> > Tomcat 3.x does not include this feature, although you 
> could write it
> > yourself.
> >
> > Craig McClanahan
> >
> >
> > On Thu, 13 Sep 2001 [EMAIL PROTECTED] wrote:
> >
> > > Date: Thu, 13 Sep 2001 12:06:30 +0200
> > > From: [EMAIL PROTECTED]
> > > Reply-To: [EMAIL PROTECTED]
> > > To: [EMAIL PROTECTED]
> > > Subject: request logging in Tomcat?
> > >
> > >
> > > Hi all,
> > >
> > > how can I set up Tomcat (standalone) for logging the 
> incoming requests
> > > including request path,
> > > data/time and - very important - the IP and/or domain of 
> the requester?
> > >
> > > I enabled all logging (Tomcat, Servlet, JSP and Context 
> Manager) but I
> > > didn't get the IP from the
> > > requesting client. Any ideas?
> > >
> > > Regards
> > >
> > > Michael Brohl
> > >
> > >
> > >
> > >
> > >
> >
> >
> 
> 



RE: request logging in Tomcat?

2001-09-13 Thread Schorsch Family

yes i know, but as logging that he wanted is not available with 3.x.x (as
you pointed out) it is not much of a reach to add apache to get the desired
logs, i.e. An alternative to your suggestion to write the logging from
scratch.

dave

-Original Message-
From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
R. McClanahan
Sent: Thursday, September 13, 2001 2:27 PM
To: [EMAIL PROTECTED]
Subject: RE: request logging in Tomcat?




On Thu, 13 Sep 2001, Schorsch Family wrote:

> Date: Thu, 13 Sep 2001 13:12:54 -0500
> From: Schorsch Family <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: RE: request logging in Tomcat?
>
> I use the logging in Apache to monitor tomcat requests.
>

That also works, of course.  But the original question was about Tomcat
stand alone.

> Dave
>

Craig

> -Original Message-
> From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
> R. McClanahan
> Sent: Thursday, September 13, 2001 11:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: request logging in Tomcat?
>
>
> By default, Tomcat 4 creates access log files for you in the same format
> that web servers do.  It includes all of the stuff you are talking about.
>
> Tomcat 3.x does not include this feature, although you could write it
> yourself.
>
> Craig McClanahan
>
>
> On Thu, 13 Sep 2001 [EMAIL PROTECTED] wrote:
>
> > Date: Thu, 13 Sep 2001 12:06:30 +0200
> > From: [EMAIL PROTECTED]
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: request logging in Tomcat?
> >
> >
> > Hi all,
> >
> > how can I set up Tomcat (standalone) for logging the incoming requests
> > including request path,
> > data/time and - very important - the IP and/or domain of the requester?
> >
> > I enabled all logging (Tomcat, Servlet, JSP and Context Manager) but I
> > didn't get the IP from the
> > requesting client. Any ideas?
> >
> > Regards
> >
> > Michael Brohl
> >
> >
> >
> >
> >
>
>




RE: request logging in Tomcat?

2001-09-13 Thread Schorsch Family

I use the logging in Apache to monitor tomcat requests.

Dave

-Original Message-
From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
R. McClanahan
Sent: Thursday, September 13, 2001 11:01 AM
To: [EMAIL PROTECTED]
Subject: Re: request logging in Tomcat?


By default, Tomcat 4 creates access log files for you in the same format
that web servers do.  It includes all of the stuff you are talking about.

Tomcat 3.x does not include this feature, although you could write it
yourself.

Craig McClanahan


On Thu, 13 Sep 2001 [EMAIL PROTECTED] wrote:

> Date: Thu, 13 Sep 2001 12:06:30 +0200
> From: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: request logging in Tomcat?
>
>
> Hi all,
>
> how can I set up Tomcat (standalone) for logging the incoming requests
> including request path,
> data/time and - very important - the IP and/or domain of the requester?
>
> I enabled all logging (Tomcat, Servlet, JSP and Context Manager) but I
> didn't get the IP from the
> requesting client. Any ideas?
>
> Regards
>
> Michael Brohl
>
>
>
>
>




Re: request logging in Tomcat?

2001-09-13 Thread Craig R. McClanahan

By default, Tomcat 4 creates access log files for you in the same format
that web servers do.  It includes all of the stuff you are talking about.

Tomcat 3.x does not include this feature, although you could write it
yourself.

Craig McClanahan


On Thu, 13 Sep 2001 [EMAIL PROTECTED] wrote:

> Date: Thu, 13 Sep 2001 12:06:30 +0200
> From: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: request logging in Tomcat?
>
>
> Hi all,
>
> how can I set up Tomcat (standalone) for logging the incoming requests
> including request path,
> data/time and - very important - the IP and/or domain of the requester?
>
> I enabled all logging (Tomcat, Servlet, JSP and Context Manager) but I
> didn't get the IP from the
> requesting client. Any ideas?
>
> Regards
>
> Michael Brohl
>
>
>
>
>




request logging in Tomcat?

2001-09-13 Thread michael . brohl


Hi all,

how can I set up Tomcat (standalone) for logging the incoming requests
including request path,
data/time and - very important - the IP and/or domain of the requester?

I enabled all logging (Tomcat, Servlet, JSP and Context Manager) but I
didn't get the IP from the
requesting client. Any ideas?

Regards

Michael Brohl







Re: Logging in tomcat

2001-03-28 Thread tomcat user

Thanks for the good info!

--Original Message--
From: "Mark Mynsted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Sent: March 23, 2001 3:07:21 PM GMT
Subject: Re: Logging in tomcat


I think the simplest way is to just use
application.log("This is a message to be logged");

This goes to the Servlet.log.  A little better maybe would be to define
something like:
String logHeader = request.getServletPath() + ": ";

Then use
application.log(logHeader + "This is a message to be logged.");

This way the log message will be prefixed with the servlet generating the
message.

The "application" variable is automatically defined for the service method.

>>> tomcat user <[EMAIL PROTECTED]> 3/22/2001 3:04:12 PM >>>
I am a new user to the Tomcat world.

I haven't found much info on logging in tomcat. Is there somewhere I can go
to look up this info?

How does logging work in tomcat. If I write system.out's, will I see those
on the tomcat console? Or, does this have to go through logging? If so, how
would I invoke the logging mechanism?

I'm just interested in getting debug info out of Tomcat.

Thanks


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup



Re: Logging in tomcat

2001-03-28 Thread tomcat user

Thanks for the info! That helps. I'll check out the log4j.

--Original Message--
From: Anuj Agrawal <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: March 23, 2001 12:11:51 AM GMT
Subject: Re: Logging in tomcat


tomcat user wrote:

> I haven't found much info on logging in tomcat. Is there somewhere I can
go
> to look up this info?

Definetly!  You might want to look at the Log4j project at
http://jakarta.apache.org/log4j/docs/index.html
Extremely Cool! 8)

> How does logging work in tomcat. If I write system.out's, will I see those
> on the tomcat console? Or, does this have to go through logging? If so,
how

in {TOMCAT_HOME}/conf/wrapper.properties, it indicates the following:
# Defining where the service is going to put the standard
# output of Tomcat. This is where System.out.println and
# System.err.println goes to.
#
wrapper.stdout=$(wrapper.tomcat_home)\logs\jvm.stdout
wrapper.stderr=$(wrapper.tomcat_home)\logs\jvm.stderr

So your system.out's will go to logs/jvm.stdout

HTH.
Anuj.


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup



Re: Logging in tomcat

2001-03-23 Thread Mark Mynsted

I think the simplest way is to just use
application.log("This is a message to be logged");

This goes to the Servlet.log.  A little better maybe would be to define something like:
String logHeader = request.getServletPath() + ": ";

Then use
application.log(logHeader + "This is a message to be logged.");

This way the log message will be prefixed with the servlet generating the message.

The "application" variable is automatically defined for the service method.

>>> tomcat user <[EMAIL PROTECTED]> 3/22/2001 3:04:12 PM >>>
I am a new user to the Tomcat world.

I haven't found much info on logging in tomcat. Is there somewhere I can go
to look up this info?

How does logging work in tomcat. If I write system.out's, will I see those
on the tomcat console? Or, does this have to go through logging? If so, how
would I invoke the logging mechanism?

I'm just interested in getting debug info out of Tomcat.

Thanks


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup 





RE: Logging in Tomcat

2001-01-16 Thread Barclay, Tom

Yes, setting the verbosity level is one way to up the amount of log
information you are getting. Be aware, if you turn it way up (so you log
quite a lot), the consequences can be performance impacting (and not in a
good way). 

There are good reasons the default levels are set to log less information.
If you need more information, crank up the log verbosity level but expect
slower operation. It's probably not a good thing in a production system.  :)

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 16, 2001 2:15 PM
> To: [EMAIL PROTECTED]
> Subject: Logging in Tomcat
> 
> 
> hi,
>   i'd like some information on logging in tomcat. i 
> believe u have to
> change the verbosity level in the server.xml file. only error 
> logs are being
> generate in my case. i want the log file to be updated 
> everytime the user
> access any web application on tomcat. i'd appreciate any help.
>   thanks,
> 
> Mohan.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Logging in Tomcat

2001-01-16 Thread mohan . kulkarni

hi,
i'd like some information on logging in tomcat. i believe u have to
change the verbosity level in the server.xml file. only error logs are being
generate in my case. i want the log file to be updated everytime the user
access any web application on tomcat. i'd appreciate any help.
thanks,

Mohan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]