tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53930] New: allow capture of catalina stdout/stderr to a command instead of just a file
Date Mon, 24 Sep 2012 15:53:47 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53930

          Priority: P2
            Bug ID: 53930
          Assignee: dev@tomcat.apache.org
           Summary: allow capture of catalina stdout/stderr to a command
                    instead of just a file
          Severity: enhancement
    Classification: Unclassified
                OS: Mac OS X 10.4
          Reporter: clucas@e-miles.com
          Hardware: Macintosh
            Status: NEW
           Version: trunk
         Component: Catalina
           Product: Tomcat 8

Created attachment 29414
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29414&action=edit
patch to catalina.sh adding support for CATALINA_OUT_CMD

catalina.sh currently supports passing in a value for CATALINA_OUT. If supplied
the stdout/stderr of the java process will be redirected to this file. This
single file scenario makes it difficult to keep file contents for long running
process separated on a per day basis as is typical for production logging
scenarios.  We use cronolog (http://http://cronolog.org/) to do automatic log
rolling but others may have different needs.  The attached patch adds support
to catalina.sh for an optional CATALINA_OUT_CMD variable. If this variable is
defined, the stdout and stderr of the java process will be piped to the
command.  We use it as in:

CATALINA_OUT_CMD="cronolog $CATALINA_BASE/logs/catalina.%Y-%m-%d.out >/dev/null
2>&1"
export CATALINA_OUT_CMD
catalina.sh start $@

Of course long-running, server-side applications should typically not be
writing to stdout/stderr but sometimes this is out of your control.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Mime
View raw message