leading zeros for hourly access logs

Discussion in 'Feedback/Feature Requests' started by jrmarino, Aug 16, 2007.

  1. jrmarino

    jrmarino New Member

    I know this is a small thing, but can you use leading zeros for the hour part of the filename for access logs? Here's a recent example of mine:

    Code:
    access.log.2007_08_15.2
    access.log.2007_08_15.20
    access.log.2007_08_15.21
    access.log.2007_08_15.22
    access.log.2007_08_15.23
    access.log.2007_08_15.3
    access.log.2007_08_15.4
    access.log.2007_08_15.5
    access.log.2007_08_15.6

    I would like the filenames to be this instead:
    Code:
    access.log.2007_08_15.02
    access.log.2007_08_15.03
    access.log.2007_08_15.04
    access.log.2007_08_15.05
    access.log.2007_08_15.06
    ...
    access.log.2007_08_15.20
    access.log.2007_08_15.21
    access.log.2007_08_15.22
    access.log.2007_08_15.23
    
    The reason should be obvious. The files are not sorted in order if you don't use leading zeros for the hour. Note that you do correctly use leading zeros for the month and day, so if nothing else: be consistent.

    Thanks for listening.
  2. mistwang

    mistwang LiteSpeed Staff

    sure, will do.

Share This Page