llewelld/getiplay

Trimmed log file isn't being trimmed

Closed this issue · 1 comments

The log file visible in the app is only supposed to track the last 50 lines of log file (there's a separate disk-resident log that tracks everything).

Unfortunately this 'trimmed' log isn't being trimmed correctly. Over time it will increase in size, and this can cause a serious performance penalty if it gets too large, because the entire log gets rendered in a text widget.

Two fixes are needed

  1. Ensure the log is properly trimmed when new lines are added mid-execution.
  2. Ensure the log is properly trimmed when it's loaded at startup.

Currently the first is implemented but broken, and the second doesn't exist.

Created branch 87-trim-logfile for this.