On 08/10/2014 19:36, Konstantin Kolinko wrote:
> 2014-10-08 18:05 GMT+04:00  <ma...@apache.org>:
>> Author: markt
>> Date: Wed Oct  8 14:05:22 2014
>> New Revision: 1630110
>>
>> URL: http://svn.apache.org/r1630110
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47919
>> Extend the information logged when Tomcat starts to optionally include 
>> (enabled by default) the values of key environment variables.
> 
> I really do not like this.
> 
> 1.  Does this even work?

Yes.

> Those variables are local to shell process. They are not exported (and
> there is no need for them to be). The Java process should not inherit
> them.
> 
> 2. There are many ways to launch Tomcat besides catalina.sh/catalina.bat.
> 
> This logging has no meaning when launching Tomcat as a Windows
> service, or launching it from within IDE, and in other circumstances.

True.

> Those variables are just internal details of how
> catalina.sh/catalina.bat scripts are implemented. Even if you log a
> variable, there is no guarantee that the value is actually used by
> java process.

Also true.

> 3. catalina.sh/catalina.bat already logs a number of those variables.

Indeed but if you read the bug report you'll see what strikes me as a
reasonable use case.

An alternative approach would be to log the CATALINA_BASE and
CATALINA_HOME system properties (since Tomcat uses these) along with the
result of ManagementFactory.getRuntimeMXBean().getInputArguments()

Thoughts?

Mark

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

Reply via email to