Re: [BuildStream] Buildbox-casd logs



On Wed, Sep 11, 2019 at 09:59:04 +0000, Benjamin Schubert wrote:
I agree, $XDG_CACHE_HOME is a better location.
Oups my bad, that's what I wanted to mean. We agree here

Excellent.  Vigorous agreement is best agreement.

Also, I'd be tempted to rotate that log somehow, but I appreciate that
might be out of scope for bst itself.

I almost suggested storing each session log as a separate file in CAS,
relying on existing expiry, but that's not exactly helpful to debug CAS
issues.

Storing it as simple file probably makes sense, however, I'm also
worried about the log growing without limits. If we're not supporting
full log rotation, could we at least use a very simple approach to
avoid unlimited log file growth? E.g., on startup check the current
size of the log file and if it's above a certain threshold, delete or
rename it (or cut off the oldest part).

Storing in CASD itself is indeed probably not acceptable.
What about a rotation? We keep the last 10 logs of CASD (last 10 sessions)
On startup, before we launch CASD, we rename each file buildbox-casd.log.X+1,
and remove any that is X>=10?

Would that address all the problems?

I think that'd work well for me, so in a regularly used system we'd expect
to see casd.log, casd.log.1, ... casd.log.9

And each rotation deletes casd.log.9 and rotates the others into place.

:+1: from me.

D.

-- 
Daniel Silverstone                          https://www.codethink.co.uk/
Solutions Architect               GPG 4096/R Key Id: 3CCE BABE 206C 3B69


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]