mill icon indicating copy to clipboard operation
mill copied to clipboard

Limit the size of `.bsp/mill-bsp.stderr`

Open lefou opened this issue 3 years ago • 3 comments

Currently, this file is growing unlimited, which can become an issue if disc space gets low.

lefou avatar Dec 16 '22 07:12 lefou

I think it should be implemented like some kind of log rotation with specifying somewhere (or just harcoding) values like logMaxSize, logFileLimit. There are a lot of examples of such problem (the first one which I googled: link) and looks like we should implement something like this.

seroperson avatar Dec 20 '22 09:12 seroperson

Yeah, log-rotation might be nice. This topic seems simple and very common, yet it provides lots of ways to shot yourself in the foot. Especially, as we target different platforms including Windows, which provides lots of stumbling blocks like file locking. Using some small proven library is probably a good idea.

lefou avatar Dec 22 '22 11:12 lefou

rotating-fos looks suitable here, it provides just some extensible OutputStream. I will try to implement it in near time.

seroperson avatar Dec 24 '22 14:12 seroperson