tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: gc log filename variables in windows
Date Mon, 08 Oct 2012 18:26:35 GMT
MrVJTod wrote:
> In linux/solaris, I can specify
>  -Xloggc:/my/logs/sourcecode-gc-${NOW}.log 
> And get a logfile named as such
>  /my/logs/sourcecode-gc-1008-0938.log 
> with the last time of startup as past of the log filename
> 
> But if I try to do something similar in Windows
>  -Xloggc:c:\my\logs\sourcecode-gc-${NOW}.log 
> I get a logfile named
>  c:\my\logs\sourcecode-gc-${NOW}.log 
> with the variable text as past of the log filename
> 
> Does tomcat on Windows not support variables in the GC filename?
> I've tried a dozen different combinations
>   $DATE  //    ${%DATE%}  //  $[%DATE%]  //  $(%DATE%)
>   ${DATE}  //  $[DATE]  //  $(DATE)  //  $DATE  //  %DATE  //  %NOW%
>   `%DATE%`  //  '%DATE%'  //  `cmd /c now /t`  //  'cmd /c now /t'
>   %Y  //  %YYYY
> and several other iterations
> but the logfilename contains the variable that I was hoping would be
> replaced with a timestamp.
> 
> and I can't seem to find a solid reference for Windows GC log filenames.
> 
> 
Hi.

1) That's not really a Tomcat question, it's a Java JVM question.
So the question "Does tomcat on Windows not support variables in the GC filename?" is 
mis-directed. The "-Xloggc" is not a Tomcat parameter, it is a JVM parameter, interpreted

by the JVM which runs Tomcat. Get the difference ?

2) Under Linux, where is the "NOW" variable set ? (probably in a Tomcat startup shell 
script, right ?)

3) How do you start (the JVM which runs) Tomcat under Windows ?
(If it is started as a Windows Service, it doesn't really have a Linux-like shell.  It - 
or rather the "service wrapper" (which runs the JVM which runs Tomcat) - takes its 
parameters from the Windows Registry, not the command-line.  No shell = no shell variables

= no "NOW").

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


Mime
View raw message