1

Jetty provides the NCSARequestLog to log the requests. But this seems to rollover on a daily basis by default.

Is there an option to have this rollover on an hourly basis?

Or is there a way to provide a custom log appender for this?

alfonx
  • 6,936
  • 2
  • 49
  • 58
Vinay
  • 9
  • 4

1 Answers1

-1

I am not 100% sure what exactly you mean with rollover, but I see two things worth trying:

  1. Look at the retainDays setting, to define when old logs may be delted. wiki.eclipse.org/Jetty/Howto/Configure_Request_Logs

  2. Tyr to set the filename template to something that is hour-specific:

<requestLog implementation="org.mortbay.jetty.server.NCSARequestLog">
    <filename>target/yyyy_mm_dd_hh.request.log</filename>
    <retainDays>10</retainDays>
    <append>true</append>
    <extended>true</extended>
    <logTimeZone>GMT+1</logTimeZone>
</requestLog>

Please feedback, if this works, since I didn't explicitly try it.

alfonx
  • 6,936
  • 2
  • 49
  • 58
  • Thanks! Sorry for getting back so late on this. I actually, went for a custom appender solution as I wanted some other custom changes to the access logs. But I think the second option should work. By rollover - I mean the rotation of the access log files by the hour. – Vinay May 08 '12 at 17:01