tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Cheshire <yahoono...@gmail.com>
Subject Re: catalina_out env var
Date Fri, 01 Nov 2019 18:12:45 GMT
On Fri, Nov 1, 2019 at 1:59 PM Mark Thomas <markt@apache.org> wrote:
>
> On November 1, 2019 3:25:36 PM UTC, Chris Cheshire <yahoonomas@gmail.com> 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?
> >Can I force a redirection to /dev/null instead so I don't have
> >duplicated logs?
> >
>
> You can control this in logging.properties  Just disable the console logger.
>
> You don't want redirect to /dev/null as then you will be unable to take thread dumps
or anything else that writes to stdout.
>
> It is setup this way for users running Tomcat directly from the console.
>
> Mark
>

OK so I just remove java.util.logging.ConsoleHandler from the
.handlers line? Does this affect the content of catalina.log, or
catalina.date.log?

I'm less concerned about the chattiness than the redundancy. I've got
two logs that contain the same thing, one I have to control with
logrotate.d and the other automatically rotates but is never cleared
so I also need a cron job to remove old logs. I'm just trying to clean
things up.

Thanks

Chris

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


Mime
View raw message