Skip to content

Make indexer logs logrotate more reliably #587

Description

@drn05r

Currently the indexer logs only rotate (by default) one day after the indexer was last restarted. If the indexer is regularly restarted the logs will rarely get rotated. There should be a better way to check if the log needs rotating.

The best plan I can think of is to check the last modified time of indexer.log.1 and if this is over a day (or whatever the log rotation set is set to) then rotate the logs. Like the existing method, which is done as part of a respawn, this is checked each time the event queue is polled. The only problem is if there is not yet an indexer.log.1. Therefore, the best plan may be to create an empty file if it does not exist and then this will ensure a day later (or whatever the setting) the log file will be rotated.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions