From: Bill L. <bli...@to...> - 2003-08-27 18:24:38
|
Hi Leif- Thanks for your response. Another possibility is to open the config syntax to define the execution of a command file or executable before the service is started. This could load an environment variable with a value calculated during the execution. I am pretty sure the execution needs to be in the same command environment that the service is started in so the service has access to the environment variable. I haven't worked in this area so I don't know how easy/hard/impossible this is, but it is another idea. Another solution that does not involve Wrapper is to copy the file and rename it based on the file timestamp. I will look into this one further. Thanks again. -Bill > -----Original Message----- > From: Leif Mortenson [mailto:le...@ta...]=20 > Sent: Wednesday, August 27, 2003 12:56 PM > To: wra...@li... > Subject: Re: [Wrapper-user] Can I get a timestamp in my config files? >=20 >=20 > Bill, > Currently, there is no way to do what you are asking for, and=20 > implementing it > would be a major change. I assume that you would want the=20 > timestamp value > to be updated whenever the Wrapper was restarted? As things are, all=20 > property > values are evaluated at Wrapper startup. >=20 > One thought would be to define a set of pseudo=20 > environment variables=20 > which > would let you do this: > -Xloggc:C:\Logs\%T_YEAR%%T_MONTH%%T_DAY%... or something like that. > It would be a little bit of a hack, but these could then be=20 > expanded at=20 > the time the > command line is generated. The drawback would be that the=20 > tokens could only > be used in property values that are associated with the Java command=20 > line. If > the feature goes in, I would like it do be able to be used in=20 > any property. >=20 > The individual tokens are being suggested rather than a simple > %TIMESTAMP% token to avoid future requests about wanting a slightly=20 > different > format :-) >=20 > Anyway, I need to think about this more. Anyone else,=20 > feel free to=20 > post if you > have any comments on how this could be best implemented. >=20 > Cheers, > Leif >=20 > Bill Littman wrote: >=20 > >I am looking to add a line similar to this to my=20 > wrapper.java.additional > >parameters: > > > >-Xloggc:C:\Logs\$timestamp$GC.log > > > >Where $timestamp$ will resolve to "20030827100123456" when it is > >performed on 27 Aug 2003, 10:01:23.456. I have control of=20 > the parsing of > >the file name that occurs later, so the actual format doesn't matter. > >Obviously it must contain only legal filename characters=20 > (currently this > >runs on Windows). > > > >Is there any way to do this in my wrapper config file? > > > >Thanks. > > > > =20 > > >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user >=20 |