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 2009/09/30 10:36:32 UTC

DO NOT REPLY [Bug 47919] New: Log Tomcat & Java environment variables in addition to echoing to the screen

https://issues.apache.org/bugzilla/show_bug.cgi?id=47919

           Summary: Log Tomcat & Java environment variables in addition to
                    echoing to the screen
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: eric@freesa.org


When looking at a catalina.out, it's not always clear what the environment
variables resolved to at the time the process was started.

This information may be echoed to the screen if not started by hand, but that
may be gone by the time we're looking at the log file.

It would be helpful to log these variables to the catalina.out at startup.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 47919] Log Tomcat & Java environment variables in addition to echoing to the screen

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

--- Comment #1 from Eric Herman <er...@freesa.org> 2009-09-30 01:40:43 PDT ---
Created an attachment (id=24325)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24325)
example patch for logging environment variables to catalina.out at start time 

Perhaps doing something a little like this.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 47919] Log Tomcat & Java environment variables in addition to echoing to the screen

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

--- Comment #2 from Eric Herman <er...@freesa.org> 2009-09-30 03:32:30 PDT ---
or perhaps cleaner as:

diff -u catalina.sh.orig catalina.sh
--- catalina.sh.orig    2009-09-30 10:22:39.039478613 +0200
+++ catalina.sh    2009-09-30 11:26:31.606955254 +0200
@@ -265,6 +265,22 @@

   shift
   touch "$CATALINA_BASE"/logs/catalina.out
+
+  CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out
+  cat <<EOF >> $CATALINA_OUT
+Using CATALINA_BASE:      $CATALINA_BASE
+Using CATALINA_HOME:      $CATALINA_HOME
+Using CATALINA_TMPDIR:    $CATALINA_TMPDIR
+Using JAVA_HOME:          $JAVA_HOME
+Using JRE_HOME:           $JRE_HOME
+Using _RUNJAVA:           $_RUNJAVA
+Using _RUNJAVA -version   $($_RUNJAVA -version 2>&1)
+Using JAVA_OPTS:          $JAVA_OPTS
+Using CATALINA_OPTS:      $CATALINA_OPTS
+Using JAVA_ENDORSED_DIRS: $JAVA_ENDORSED_DIRS
+Using CLASSPATH:          $CLASSPATH
+EOF
+
   if [ "$1" = "-security" ] ; then
     echo "Using Security Manager"
     shift

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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 47919] Log Tomcat & Java environment variables in addition to echoing to the screen

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

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
The recently added VersionLoggerListener has been extended to optionally
include these environment variables. This feature is enabled by default.

This change has been applied to 8.0.x for 8.0.15 onwards.

I do not intend to propose this for backport to 7.0.x or 6.0.x.

-- 
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 47919] Log Tomcat & Java environment variables in addition to echoing to the screen

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

--- Comment #4 from Violeta Georgieva <vi...@apache.org> ---
This is back-ported in 7.0.x and will be available in 7.0.57 onwards.

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