I haven't tried this in 4 but in 3 you can always just print to stdout or
stderr
eg. System.out.println(In the Foo function);
Which will get printed to the console or your logs depending on how you're
running tomcat
That is a very good idea. I'll give that a try. Also, I found that
the
One question about this subject.
Why the Tomcat (4) team (Craig and others) didn't use log4J to trace the server ?
-Message d'origine-
De: G.Nagarajan [SMTP:[EMAIL PROTECTED]]
Date: vendredi 19 octobre 2001 10:48
À:[EMAIL PROTECTED]
Objet:RE: Logging from a servlet
]]
Sent: Friday, October 19, 2001 10:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Logging from a servlet in Tomcat
One question about this subject.
Why the Tomcat (4) team (Craig and others) didn't use log4J to trace the
server ?
-Message d'origine-
De: G.Nagarajan [SMTP:[EMAIL PROTECTED
PROTECTED]]
Sent: Friday, October 19, 2001 10:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Logging from a servlet in Tomcat
One question about this subject.
Why the Tomcat (4) team (Craig and others) didn't use log4J to trace the
server ?
-Message d'origine-
De: G.Nagarajan [SMTP
On 19 Oct 2001, Dr. Evil wrote:
Date: 19 Oct 2001 08:29:44 -
From: Dr. Evil [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Logging from a servlet in Tomcat
I have a question: It would be extremely useful for a servlet to be
able to record debugging
On Fri, 19 Oct 2001, Arnaud Héritier wrote:
Date: Fri, 19 Oct 2001 10:55:49 +0200
From: Arnaud Héritier [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED],
[EMAIL PROTECTED] [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: RE: Logging from a servlet in Tomcat
One
]
Subject: Re: Logging the IP addresses of page requests
hi nick,
try request.getRemoteHost()
request.getRemoteAddress() etc etc
look up the servlet api for more info
ravi
On Mon, 03 Sep 2001 Nick Flowers wrote :
Hi,
Anyone know how to do this for a standalone
Tomcat server? v3.2?
Cheers
to get up to security
spec. Cheers, Nick.
-Original Message-
From: ravi shankar [mailto:[EMAIL PROTECTED]]
Sent: 03 September 2001 12:25
To: [EMAIL PROTECTED]
Subject: Re: Logging the IP addresses of page requests
hi nick,
try request.getRemoteHost()
request.getRemoteAddress() etc
Tomcat 3.2 does not create access log files in the format required for
tools like WebTrands. You will need to do one of the following things:
* Run Tomcat 3.2 behind a web server like Apache (which will create such
log files for you).
* Run Tomcat 4.0 in stand-alone mode (which will create
I've tried all this, and my conclusion was that although I could get a dos
window to 50 lines (by hacking at some file's properties in the Windows dir),
developing on win98 is totally crap. You can't tail log files properly, and
it's one huge pain. My advice is to develop under something more
Look in server.xml Read the comments there.
In Tomcat 3.2.2 (and probably in 3.2.1 also) the following comment appears
in server.xml:
!-- if you don't want messages on screen, add the attribute
path=logs/tomcat.log
to the Logger element below
--
-Original
Have you tried using Log4J?
Yep... Log4J is what you need.
http://jakarta.apache.org/log4j/docs/index.html
-- Brian
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Logging System.out/err in Tomcat
Date: Mon, 25 Jun 2001 08:15:05 +0200
Hi out there!
I've
Best Approach:
In the Servlet 2.3 spec (So Tomcat 4.0) you could use Filters.. a Filter may
be run before or after a Servlet.. modifying what it sees, or what it
returns.
- Chris.
-Original Message-
From: Roland Carlsson [mailto:[EMAIL PROTECTED]]
Sent: 18 June 2001 9:45
To:
Tomcat 4 supports filters, which may do exactly what you want. They are
defined on the 2.3 spec IIRC. Basically, its a bit of code that gets
accessed before the requested page. There was an article about the use of
filters i think either on javaworld or servlets.com. Assuming you want a 3.2
Subject: RE: Logging
Best Approach:
In the Servlet 2.3 spec (So Tomcat 4.0) you could use Filters.. a Filter may
be run before or after a Servlet.. modifying what it sees, or what it
returns.
- Chris.
-Original Message-
From: Roland Carlsson [mailto:[EMAIL PROTECTED
Make sure you have:
Logger name=tc_log
path=logs/tomcat.log
customOutput=yes /
Logger name=servlet_log
path=logs/servlet.log
customOutput=yes /
Logger name=JASPER_LOG
path=logs/jasper.log^
verbosityLevel =
]
Subject: Re: Logging
any one can help me out?
thanks again.
--- alan leung [EMAIL PROTECTED] wrote:
Hi,
I am sorry that this may be out of topic of the
group.
since i can't find a user-group for apache server.
can any one kindly tell me whay the following did
not
print out the log
Try http://localhost:8080/admin/index.html
That's the way it worked for me.
Miguel Ramos
-Original Message-
From: Foster, Jim [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 11:30 AM
To: [EMAIL PROTECTED]
Subject: Logging on to /admin with NT 4 and IIS
I have been working
That did it! It's fixed (at least a workaround)! Does anyone know *why* I
have to use the port number to get this to work?
Thanks!
-Original Message-
From: Ramos Miguel-FMR068c [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 11:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 12:12 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Logging on to /admin with NT 4 and IIS
That did it! It's fixed (at least a workaround)! Does anyone know *why* I
have to use the port number to get this to work?
Thanks!
-Original Message
You might need change the trusted=false to trusted=true in server.xml for
the admin context.
- Original Message -
From: Foster, Jim [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 26, 2001 1:29 PM
Subject: Logging on to /admin with NT 4 and IIS
I have been working with
describe. But this is something you should work out.
-Original Message-
From: Ramos Miguel-FMR068c [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 11:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Logging on to /admin with NT 4 and IIS
Try http://localhost:8080/admin/index.html
any one can help me out?
thanks again.
--- alan leung [EMAIL PROTECTED] wrote:
Hi,
I am sorry that this may be out of topic of the
group.
since i can't find a user-group for apache server.
can any one kindly tell me whay the following did
not
print out the log on screen? I had pipe the
please help me out.
thanks.
--- alan leung [EMAIL PROTECTED] wrote:
Hi,
I am sorry that this may be out of topic of the
group.
since i can't find a user-group for apache server.
can any one kindly tell me whay the following did
not
print out the log on screen? I had pipe the log
On Tue, 17 Apr 2001, Sam Newman wrote:
To get stuff into the log, you have to do the following (I'm assuming your
in a servlet at the time!)
this.getServletContext().log("msg");
or
this.getServletContext().log("msg", exception);
Check the API docs for HttpServletContext for more
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
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 messa
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
You could use the HTTPUtils.getRequestURL() to do it yourself... I am not
sure how well that performs/scales.
-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 1:55 PM
To: [EMAIL PROTECTED]
Subject: Re: Logging request/response headers
On Tue, 13 Mar 2001, DONNIE HALE wrote:
Is there any way to enable logging of the request and response headers in Tomcat
3.2.1? I see that jasper.log contains the requested URL as well as query parameters,
etc. But I could really use a trace of the actual inbound and outbound HTTP headers.
It is very often due to the fact you forgot to set the
environement variables TOMCAT_HOME ant JAVA_HOME in the startup.bat
file.
Or maybe if you use Apache as a static page web server,
the line used to include the Tomcat.conf file is not well
written.
-Original Message-From:
I already had this problem. are you using version 3.1 or 3.0 ?
If you're, you can try restarting the PC if it is the same, reinstall
Java
Bye
Robuschi Roberto Delfi srl
P.za Ravenet 1/b - 43100 PARMA
Tel. 0521/932474 Fax 0521/989045
[EMAIL PROTECTED] ---
Tomcat is working OK. The problem is in deploying
some my application. I want to se error log file, to corect errors in my
application.
- Original Message -
From:
Xavier
To: [EMAIL PROTECTED]
Sent: Monday, February 05, 2001
12:27
Subject: RE: Logging errors
26
Subject: Re: Logging errors on Tomcat Startup
I already had this problem. are you using version 3.1 or 3.0 ?
If you're, you can try restarting the PC if it is the same, reinstall
Java
Bye
Robuschi Roberto Delfi srl
P.za Ravenet 1/b - 43100 PARMA
Tel. 0521/
: [EMAIL PROTECTED]Subject: RE: Logging
errors on Tomcat Startup
It is very often due to the fact you forgot to set
the environement variables TOMCAT_HOME ant JAVA_HOME in the startup.bat
file.
Or maybe if you use Apache as a static page web
server, the line used to include
see server.xml in tomcat/conf
:add
path="logs/tomcat.log"
to Logger name="tc_log"...
Dusan Petrovic wrote:
Hi,I have problem during the start of TomCat servertomcat start After few seccond,
TomCut write some errors on the screen and then that window desappear. I can not see
what is the
Hi,I have problem during the start of TomCat servertomcat start After few
seccond, TomCut write some errors on the screen and then that window
desappear. I can not see what is the problem. My question is: Can I see log
of those errors??? Thanks!!!
If you are using NT or 2000 Windows Os try
Or you simply add the "pause" command at the end of the .bat file ...
-Original Message-
From: Gallicus [mailto:[EMAIL PROTECTED]]
Sent: lundi 5 fvrier 2001 13:25
To: [EMAIL PROTECTED]
Subject: Re: Logging errors on Tomcat Startup
Hi,I have problem during the start
If you are on Windows, try the
following.
See the log files
Start tomcat from the DOS window with the following
command that saves the output to a file
tomcat run tomcat.out 21
tomcat.out contains the error log. Use your
favorite editor (emacs! :-)) to look at the log.
- Original
Redirect both the System.out and the System.err to the same outputstream
(which is your FileOutputStream), then you'll avoid the error messages in
the window.
Peter Thorsager
- Original Message -
From: "Nik Makepeace" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 02,
On 2 Feb 2001, at 16:09, Adrian Papari wrote:
how do you handle the exceptions? if you, for instance, redirect the
user to an error page when an error occurs, you (or, erm, the user )
shouldn't see the internal error messages.
They aren't 500 errors, but rather conscious decisions to write
Answering questions is so much easier than doing my own work.
-Original Message-
From: Nik Makepeace [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 02, 2001 10:56 AM
To: [EMAIL PROTECTED]
Subject: RE: Logging problems
On 2 Feb 2001, at 16:09, Adrian Papari wrote:
how do you handle
ce [mailto:[EMAIL PROTECTED]]
Sent: 02 February 2001 16:56
To: [EMAIL PROTECTED]
Subject: RE: Logging problems
On 2 Feb 2001, at 16:09, Adrian Papari wrote:
how do you handle the exceptions? if you, for instance, redirect the
user to an error page when an error occurs, you (or, erm, the user )
do tomcat.sh out.txt on a linux box. All the error messeges will be
stored in file with name out.txt.
-Original Message-
From: Peter Thorsager [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 02, 2001 8:36 PM
To: [EMAIL PROTECTED]
Subject: Re: Logging problems
Redirect both
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
Unfortunately 3.2 doesn't have anything like that.You need to write your
code and log the info.Here's a piece of code that can do it:
String outputFileName = System.getProperty("user.dir")+File.separatorChar+
"logFile.txt";
FileWriter fw = new FileWriter(outputFileName,true);
Date
Joe wrote:
Hello, how do I configure tomcat to log http connections? Currently I
have three log files: jasper.log (verbosity level is set to
INFORMATION), servlet.log (customOutput set to "yes"), tomcat.log
(customOutput set to "yes"). I was expecting to find connection logging
messages
Are you looking for access log messages like a webserver creates? You will need
Tomcat 4.0 for that
Precisely. Thanks!
"Craig R. McClanahan" wrote:
Joe wrote:
Hello, how do I configure tomcat to log http connections? Currently I
have three log files: jasper.log (verbosity
201 - 248 of 248 matches
Mail list logo