You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rajnish Bhaskar <r....@compserv.gla.ac.uk> on 2000/11/06 10:55:58 UTC

JK_NT_SERVICE

Hi all,
	I'm using the JK_NT_SERVICE to run Tomcat (3.1) as a service 
on NT.  I've been looking through the wrapper.properties file to try 
and find any way to save any output via System.out.println to a file, 
rather than disappearing into oblivion as seems to happen.  I've 
found the following lines:

wrapper.stdout=$(wrapper.tomcat_home)\jvm.stdout
wrapper.stderr=$(wrapper.tomcat_home)\jvm.stderr

This seems to redirect stdout and stderr to somewhere.  How can I 
change these to point to a log file somewhere without mucking up 
the system?

Thanks,
Raj.

--------------------------
Rajnish Bhaskar
r.bhaskar@compserv.gla.ac.uk, http://i.am/rajy
IT Education Unit, University of Glasgow
http://www.iteu.gla.ac.uk/
--
Only buffoons refer to the Internet as the Information Superhighway.
     -- (The Rough Guide to the Internet 1999)


RE: JK_NT_SERVICE

Posted by Rajnish Bhaskar <r....@compserv.gla.ac.uk>.
Hi Marc,

> Those lines in wrapper.properties cause servlet stdout and stderr to be
> redirected the files jvm.stdout and jvm.stderr in the directory specified by
> wrapper.tomcat_home.  The default behaviour should be just what you want.

Ah!  Thank you.  I didn't even think of looking for files called 
jvm.stderr/out since I assumed that the behaviour would send 
output to those streams to the default out/err streams of the JVM, 
d'oh!  Thanks again,

Raj.

--------------------------
Rajnish Bhaskar
r.bhaskar@compserv.gla.ac.uk, http://i.am/rajy
IT Education Unit, University of Glasgow
http://www.iteu.gla.ac.uk/
--
Fear leads to anger.  Anger leads to hate.  Hate leads to suffering.
	-- Yoda, Star Wars Episode 1: The Phantom Menace


RE: JK_NT_SERVICE

Posted by Marc Saegesser <ma...@apropos.com>.
Raj,

Those lines in wrapper.properties cause servlet stdout and stderr to be
redirected the files jvm.stdout and jvm.stderr in the directory specified by
wrapper.tomcat_home.  The default behaviour should be just what you want.

However, there is a bug in 3.2b6 that causes odd behaviour when these files
already exist when the service starts.  The service opens the files but
doesn't seek the file pointer to EOF before starting to write to the files
so the output isn't appeneded to the log files.

The fix is trivial and I posted the diffs to tomcat-dev this morning.  You
might try deleting the jvm.stderr and jvm.stdout files and restarting tomcat
to see if your servle output appears in the files.

Marc

-----Original Message-----
From: Rajnish Bhaskar [mailto:r.bhaskar@compserv.gla.ac.uk]
Sent: Monday, November 06, 2000 3:56 AM
To: tomcat-user@jakarta.apache.org
Subject: JK_NT_SERVICE


Hi all,
	I'm using the JK_NT_SERVICE to run Tomcat (3.1) as a service
on NT.  I've been looking through the wrapper.properties file to try
and find any way to save any output via System.out.println to a file,
rather than disappearing into oblivion as seems to happen.  I've
found the following lines:

wrapper.stdout=$(wrapper.tomcat_home)\jvm.stdout
wrapper.stderr=$(wrapper.tomcat_home)\jvm.stderr

This seems to redirect stdout and stderr to somewhere.  How can I
change these to point to a log file somewhere without mucking up
the system?

Thanks,
Raj.

--------------------------
Rajnish Bhaskar
r.bhaskar@compserv.gla.ac.uk, http://i.am/rajy
IT Education Unit, University of Glasgow
http://www.iteu.gla.ac.uk/
--
Only buffoons refer to the Internet as the Information Superhighway.
     -- (The Rough Guide to the Internet 1999)