tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: [PATCH] CATALINA_LOGDIR environment variable in catalina.sh
Date Thu, 03 Jul 2003 13:58:32 GMT

Howdy,
That's why the Logger elements supports anything you want in its
"directory" attribute.  I don't think this patch is strictly necessary
and I'd prefer to keep the startup scripts as simple as possible.  What
does this patch give you that you can't already do?

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Thorsten Huber [mailto:th-tomcat-dev@agamemnon.LF.net]
>Sent: Thursday, July 03, 2003 9:47 AM
>To: tomcat-dev@jakarta.apache.org
>Subject: [PATCH] CATALINA_LOGDIR environment variable in catalina.sh
>
>Our Tomcat setup requires that the log files Tomcat generates reside
>outside CATALINA_BASE and CATALINA_HOME. So I've defined a new
>environment variable in catalina.sh named CATALINA_LOGDIR. With this
>it is easier to set up different Tomcat installations with different
>log directories.
>
>If I'm not the only one who has this problem, it would be great if
>this change gets included into the next Tomcat release, so we don't
>have to patch our Tomcat installations on future upgrades.
>
>I've attached a patch against Tomcat 4.1.24
>
>best regards
>Thorsten Huber
>
>--- catalina.sh.orig	Thu Jul  3 13:34:01 2003
>+++ catalina.sh	Thu Jul  3 14:36:28 2003
>@@ -17,6 +17,9 @@
> #                   the JVM should use (java.io.tmpdir).  Defaults to
> #                   $CATALINA_BASE/temp.
> #
>+#   CATALINA_LOGDIR (Optional) Directory path location of log
directory
>for
>+#                   catalina.out
>+#
> #   JAVA_HOME       Must point at your Java Development Kit
installation.
> #
> #   JAVA_OPTS       (Optional) Java runtime options used when the
"start",
>@@ -98,6 +101,11 @@
>   CATALINA_TMPDIR="$CATALINA_BASE"/temp
> fi
>
>+if [ -z "CATALINA_LOGDIR" ] ; then
>+  # Define the default log directory
>+  CATALINA_LOGDIR="$CATALINA_BASE"/logs
>+fi
>+
> # For Cygwin, switch paths to Windows format before running java
> if $cygwin; then
>   JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
>@@ -113,6 +121,7 @@
> echo "Using CATALINA_BASE:   $CATALINA_BASE"
> echo "Using CATALINA_HOME:   $CATALINA_HOME"
> echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
>+echo "Using CATALINA_LOGDIR: $CATALINA_LOGDIR"
> echo "Using JAVA_HOME:       $JAVA_HOME"
>
> if [ "$1" = "jpda" ] ; then
>@@ -191,7 +200,7 @@
> elif [ "$1" = "start" ] ; then
>
>   shift
>-  touch "$CATALINA_BASE"/logs/catalina.out
>+  touch "$CATALINA_LOGDIR"/catalina.out
>   if [ "$1" = "-security" ] ; then
>     echo "Using Security Manager"
>     shift
>@@ -203,7 +212,7 @@
>       -Dcatalina.home="$CATALINA_HOME" \
>       -Djava.io.tmpdir="$CATALINA_TMPDIR" \
>       org.apache.catalina.startup.Bootstrap "$@" start \
>-      >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
>+      >> "$CATALINA_LOGDIR"/catalina.out 2>&1 &
>
>       if [ ! -z "$CATALINA_PID" ]; then
>         echo $! > $CATALINA_PID
>@@ -215,7 +224,7 @@
>       -Dcatalina.home="$CATALINA_HOME" \
>       -Djava.io.tmpdir="$CATALINA_TMPDIR" \
>       org.apache.catalina.startup.Bootstrap "$@" start \
>-      >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
>+      >> "$CATALINA_LOGDIR"/catalina.out 2>&1 &
>
>       if [ ! -z "$CATALINA_PID" ]; then
>         echo $! > $CATALINA_PID
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


Mime
View raw message