Opened 18 years ago

Closed 18 years ago

#202 closed defect (fixed)

Daily log archiving failing to archive on a daily basis

Reported by: ronnielouie Owned by: ronnielouie
Priority: medium Milestone: 1.2
Component: Server Version: 1.2.0
Severity: major Keywords:
Cc: External ID: 942338

Description

It appears that Daily archiving of at least 2 of the logs (Access and Error) fail to archive daily other than the first day the setting is changed.

1) Connect to Site Admin and configure the logs for Access or Error.

2) Change the setting to archive by Day and save

3) Examine the log files directory and confirm an archive was created.

4) Examine the logs on subsequent days and not no archiving occurrs, everything is continually written to the current live log.

Change History (2)

comment:1 by ronnielouie, 18 years ago

Status: newassigned

comment:2 by ronnielouie, 18 years ago

Resolution: fixed
Status: assignedclosed

In an attempt to optimize the archiving check, the file modified timestamp would be checked for every 10th log message written. However, this applies to the overall number of log messages, not for the entries for each individual log. Thus, if a specific log is supposed to be archived daily, and if the daily boundary is crossed, and it is divisible by 10, then the log would be archived. Otherwise no archiving is performed. Unfortunately, this logic can result in several days (or other specified archive interval) to pass before an archive may be created.

To fix this, and to make the timestamp check less expensive, the timestamp will be cached, and the need for archive check will be performed for every log message. When the log is archived, the cache will be updated so that logs can be archived at the specified interval.

Fixed by submission

http://trac.osgeo.org/mapguide/changeset/1810 and http://trac.osgeo.org/mapguide/changeset/1813

Note: See TracTickets for help on using tickets.