You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/09/24 17:53:47 UTC

[Bug 53930] New: allow capture of catalina stdout/stderr to a command instead of just a file

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


[Bug 53930] allow capture of catalina stdout/stderr to a command instead of just a file [PATCH]

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53930

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|allow capture of catalina   |allow capture of catalina
                   |stdout/stderr to a command  |stdout/stderr to a command
                   |instead of just a file      |instead of just a file
                   |                            |[PATCH]

-- 
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


[Bug 53930] allow capture of catalina stdout/stderr to a command instead of just a file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53930

Casey Lucas <cl...@e-miles.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clucas@e-miles.com

-- 
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


[Bug 53930] allow capture of catalina stdout/stderr to a command instead of just a file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53930

--- Comment #2 from Casey Lucas <cl...@e-miles.com> ---
(In reply to Christopher Schultz from comment #1)
> I'm not sure if this matters a lot, but the "touch $CATALINA_OUT" has been
> dropped from this patch. Was that intentional?

I doubt it was intentional. However, the file should only be touched if will be
used - basically, around line 380.

-- 
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


[Bug 53930] allow capture of catalina stdout/stderr to a command instead of just a file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53930

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29414|0                           |1
           is patch|                            |
  Attachment #29414|application/octet-stream    |text/plain
          mime type|                            |

-- 
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


[Bug 53930] allow capture of catalina stdout/stderr to a command instead of just a file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53930

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
I'm not sure if this matters a lot, but the "touch $CATALINA_OUT" has been
dropped from this patch. Was that intentional?

-- 
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