tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: catalina_out env var
Date Fri, 01 Nov 2019 17:47:51 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chris,

On 11/1/19 11:25, Chris Cheshire wrote:
> (Tomcat 9, Debian & Centos Unix)
> 
> I use systemd to start tomcat with base and home separated using 
> catalina.sh. For the service script, values for JAVA_HOME, 
> CATALINA_HOME, CATALINA_BASE and CATALINA_OUT are defined there.
> 
> Inside catalina.sh it says this about CATALINA_OUT
> 
> #   CATALINA_OUT    (Optional) Full path to a file where stdout and
> stderr #                   will be redirected. #
> Default is $CATALINA_BASE/logs/catalina.out
> 
> If this isn't defined, catalina.sh sets a default. It seems that 
> everything that goes in here also goes in catalina.date.log 
> (controlled by the tomcat's logging.properties), so why does it
> exist?

They aren't strictly duplicated.

The file used in CATALINA_OUT will catch stdout+stderr of the process.
That includes things like System.out.print() and System.err.print().

By default, Tomcat's error loggers are configured to write to
stdout/stderr but those can be reconfigured to do other things.

stdout is always stdout, and stderr is always stderr, though.

For example, if you use "kill -3" to get a thread dump, it will never
go to catalina.date.log because it doesn't go through any logging
facility.

> Can I force a redirection to /dev/null instead so I don't have 
> duplicated logs?

You *can* do this, but you might miss some things. If you think
catalina.out is chatty, you might want to adjust logging.properties to
stop logging to the console.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl28b8YACgkQHPApP6U8
pFimxBAAxqzv3XGMb6gkcNFDnqAsMAx3vvIfmrEtWC8JpWr0O6ao0a+KI/WkeF3n
kgNuyRDvFWbCH67c9qxThXs+cDToTUZNOjeTb/OcgIScf/PbWGe1vGCdQ04SWpKQ
m3O7yTfUjnfa/VYB2L93Bzf3EVHUbhjmKrhHV7XCO358FqQNmgXdBEEWC3NB4ns0
/xqqgWxj3v9LCc1GtQ6DUiblm91WUyEFzzy9lSxCAHcarYFvXnBApodganDbfbVt
eJ/hHy68vjcIvryJ2AgGJvMY97lc0mmS3EuYZeaTFM9VHDm2wnOpEvckk5fkcZzL
pnmK1+j9RJXXKwcQPTO2FOSyOdIoTGf0pdMpGOyHlUY6cy6RcwYeHOUfCK19y28t
npfRYywOJIkphnFm4u0/etEuggn9wIQKnMLJYO9n0ei9Rp8P4ESYuXUq3QrzIvQM
czUCL9Vtl8ahgghNb+60LEuMtnVYDwcSsFdCV3bldxefOYrRvG7eP4taEFIxhV/W
dEWz9btxfbejZFQpNUQQfPy3rAPy4I6sGww/EZN7o6d66jzanergjk9FOWeQ4rSx
yDkU2/CoTppjaKofWzVB36V43kx/fdG48QOFeZ3dHCxEHzTmEyc8Vv0WEqMDv9ga
suWczx3WtOUyhbRLHWitSO3voqufoVRWY7Fl+YcPW21UHMiU21g=
=eJW1
-----END PGP SIGNATURE-----

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


Mime
View raw message