open-liberty: LG-304: Time based log rollover for Liberty

Provide time based rollover for message and trace log files in Liberty.

Suggested configuration:

<logging rolloverInterval="1d" rolloverStartTime="18:00"/>

rollover of messages.log and trace.log will occur on a schedule when rolloverInterval and/or rolloverStartTime are specified.

  • rolloverInterval

    • will use duration type.
    • is optional - if rolloverStartTime is specified but rolloverInterval is not, rolloverInterval is assumed to be 1d
  • rolloverStartTime

    • hh:mm format
      • both hours and minutes must be specified.
      • padding zeroes must be specified for hour or minute numbers < 10
      • always uses 24 hour clock (as required by ISO-8601)
      • 00:00 is the only way to refer to midnight (24:00 is invalid)
      • no decimal places allowed (whole numbers only)
    • is optional - if rolloverInterval is specified but rolloverStartTime is not, rolloverStartTime is assumed to be 00:00
  • when server starts, next rollover time is calculated as follows:

    • if rolloverStartTime is set:
      • if current time is < rolloverStartTime, first rollover will be at rolloverStartTime minus rolloverInterval x n as appropriate
      • else first rollover will be at rolloverStartTime + rolloverInterval x n as appropriate
    • else first rollover will be at midnight (at start of the day the server started) + rolloverInterval x n as appropriate
    • subsequent rollovers should occur every rolloverInterval

see RFE at https://www.ibm.com/developerworks/rfe/execute?use_case=viewChangeRequest&CR_ID=83861

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20 (18 by maintainers)

Most upvoted comments

Externals approved - For any config changes - we ensure the delivered metatype changes match what was explained in the UFO review.

@ellen-lau , Thanks for the STE slides. Thanh Giang and I have shared the slides with L2 Team.