Skip to content

Log rotation not working correctly #742

@dpmatthews

Description

@dpmatthews

The log rotation implemented in #376 appears to be flawed.
Logic was added which creates log as a symlink to 01-uiserver.log (in ~/.cylc/uiserver/log/) which is rotated at each start up.
So, we end up with a directory containing something like this:

01-uiserver.log
02-uiserver.log
03-uiserver.log
04-uiserver.log
05-uiserver.log
log -> /home/user/.cylc/uiserver/log/01-uiserver.log

However, the traitlets logging config is setup to use the file log with log rotation based on file size.
Therefore, if the log file gets large enough to trigger rotation (tested by reducing the size limit) we get this:

01-uiserver.log
02-uiserver.log
03-uiserver.log
04-uiserver.log
05-uiserver.log
log
log.1 -> /home/user/.cylc/uiserver/log/01-uiserver.log

After this, the log rotation at startup no longer works and output just gets appended to the file log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions