You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bulkan <bu...@gmail.com> on 2010/06/21 03:06:15 UTC

tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

Hi All,

Before we upgraded from Tomcat 6.0.18 to 6.0.26 I was able to redirect
stdout/stderr of tomcat.exe using the following Python code;

>>> from subprocess import Popen
>>> logfile = open('tomcat.log', 'w')
>>> p = Popen(r'"C:\Program Files\Apache Software Foundation\Tomcat
6.0\bin\tomcat6.exe"', shell=True, stdout=logfile, stderr=logfile)

but with 6.0.26, the above code fails to redirect the output to tomcat.log,
all of the output goes to the console (cmd.exe).

Has something changed in 6.0.26 (Windows) that would effect this behaviour ?

Cheers
---
Bulkan Evcimen

RE: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Subject: Re: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection
> 
> Tomcat.exe does not run Tomcat.

Well actually, tomcat6.exe does - it's just another JVM launcher.  You can use that in lieu of the scripts.  Running the .exe directly does require that the service be previously installed.

 - Chuck


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


Re: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bulkan,

On 6/21/2010 12:46 AM, Bulkan wrote:
> I am not running tomcat as a service. I directly start tomcat.exe

Tomcat.exe does not run Tomcat. So, how are you really starting Tomcat?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwfgr0ACgkQ9CaO5/Lv0PAnhgCfQufqvCMz72ZE9nzBgyIwYMlG
GgwAn0EhuQ9KtFFbEl4S3yiA2xeETMHA
=5lXq
-----END PGP SIGNATURE-----

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


Re: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

Posted by Bulkan <bu...@gmail.com>.
Hi Mark,

I am not running tomcat as a service. I directly start tomcat.exe

Cheers



On Mon, Jun 21, 2010 at 1:41 PM, Mark Eggers <it...@yahoo.com> wrote:

> If you're running as a service, why don't you make use of --StdOutput and
> --StdError as documented here:
>
> http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html
>
> Also, if you're running as a service, the Tomcat Monitor allows you to
> change this at any point. There's a tab called Logging that allows you to
> set a bunch of parameters.
>
> /mde/
>
> --- On Sun, 6/20/10, Bulkan <bu...@gmail.com> wrote:
>
> > From: Bulkan <bu...@gmail.com>
> > Subject: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection
> > To: users@tomcat.apache.org
> > Date: Sunday, June 20, 2010, 6:06 PM
> > Hi All,
> >
> > Before we upgraded from Tomcat 6.0.18 to 6.0.26 I was able
> > to redirect
> > stdout/stderr of tomcat.exe using the following Python
> > code;
> >
> > >>> from subprocess import Popen
> > >>> logfile = open('tomcat.log', 'w')
> > >>> p = Popen(r'"C:\Program Files\Apache Software
> > Foundation\Tomcat
> > 6.0\bin\tomcat6.exe"', shell=True, stdout=logfile,
> > stderr=logfile)
> >
> > but with 6.0.26, the above code fails to redirect the
> > output to tomcat.log,
> > all of the output goes to the console (cmd.exe).
> >
> > Has something changed in 6.0.26 (Windows) that would effect
> > this behaviour ?
> >
> > Cheers
> > ---
> > Bulkan Evcimen
> >
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

Posted by Mark Eggers <it...@yahoo.com>.
If you're running as a service, why don't you make use of --StdOutput and --StdError as documented here:

http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html

Also, if you're running as a service, the Tomcat Monitor allows you to change this at any point. There's a tab called Logging that allows you to set a bunch of parameters.

/mde/

--- On Sun, 6/20/10, Bulkan <bu...@gmail.com> wrote:

> From: Bulkan <bu...@gmail.com>
> Subject: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection
> To: users@tomcat.apache.org
> Date: Sunday, June 20, 2010, 6:06 PM
> Hi All,
> 
> Before we upgraded from Tomcat 6.0.18 to 6.0.26 I was able
> to redirect
> stdout/stderr of tomcat.exe using the following Python
> code;
> 
> >>> from subprocess import Popen
> >>> logfile = open('tomcat.log', 'w')
> >>> p = Popen(r'"C:\Program Files\Apache Software
> Foundation\Tomcat
> 6.0\bin\tomcat6.exe"', shell=True, stdout=logfile,
> stderr=logfile)
> 
> but with 6.0.26, the above code fails to redirect the
> output to tomcat.log,
> all of the output goes to the console (cmd.exe).
> 
> Has something changed in 6.0.26 (Windows) that would effect
> this behaviour ?
> 
> Cheers
> ---
> Bulkan Evcimen
> 


      


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