Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Upgrading from 8.1.8 to 9.1.0

On 10/10/2013 17:03, Joakim Erdfelt wrote:
/me takes calm zen-like breaths ...

Sorry! Wind is moving, flag is moving, my mind is... ummm... getting there. :-)

Leave the modules and xml files alone in the ${jetty.home} directory, there is
no need to be copying them around.

No, I meant that I copied them from the *distro* to my test server (where my
webapp is, which worked beautifully in the good old days). It has a minimal set of jars & whatnot because I want a minimal footprint. I really don't want all the other very nice stuff like websockets & what-have-you which my old-fashioned webapp doesn't need.

This technique can still be done.

Hurrah!

Here's your example:
... snip ...
*# Lets make sure our configuration in our base uses this xml*
*# We'll just add a call to the mywebapp.xml at the end of the existing start.ini*
*[my-base]$ echo "mywebapp.xml" >> start.ini*

Aha! (Sound of lightbulb appearing above my head)

Add support for this feature via the security module, and start jetty again

OK. Thanks to all your help, my test rig is now on the air again.

To add request logging support ...

*[my-base] $ java -jar ~/jetty-distribution-9.1.0.RC0/start.jar
--add-to-start=requestlog*

Did that earlier...

As for not using GMT and using something else, that's an overlooked
parameterization and configuration!
Feature / Bug filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=419146

OK. Thanks.

For now, you can do this extra step (and once that bug is resolved/fixed this
step becomes irrelevant)
*# Copy the existing etc/jetty-requestlog.xml so you can modify it to suit your
configuration base*

Done that, for reasons explained above.

Replace:
               <Set name="LogTimeZone">GMT</Set>

With:
               <Set name="LogTimeZone" type="String">
                 <Get class="java.util.TimeZone" name="default">
                   <Get name="ID"/>
                 </Get>
               </Set>

And you should be good to go.

Hmm, makes no difference. I still see GMT in the logfile:
127.0.0.1 -  -  [10/Oct/2013:15:25:31 +0000] "GET /home HTTP/1.1" 200 -

It would be nice to get local time, to make it easier to match up requests with system log entries in the webapp's database (which use local time). But this is something I lived with before, it's just something that I thought would be nice to do while I was fiddling...

And in jetty-logging.xml, I tried this:
  <Call class="java.util.TimeZone" name="getDefault"/>
instead of
  <Call class="java.util.TimeZone" name="getTimeZone"><Arg>GMT</Arg></Call>
which gives me local time, but without daylight saving (and I suppose I need to get this one figured out before winter starts!). Maybe this is a timezone bug/feature, of which Java seems to have many. Maybe I should just stick to GMT and be happy.

Couple of other minor queries:
1) any reason why the old jetty.log files are now called stderrout.log by default? Changing this back to how it was appears to involve another XML edit... 2) any reason why the server log uses a TimeZone but the request log uses a String for the TZ name? Consistency would suggest one or the other, and it should also be easy to select local time IMHO.

(I should probably shut my mouth now... I'll try to, anyway.)

Many, many thanks yet again.
--
John English


Back to the top