Re: [BuildStream] Buildbox-casd logs



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, 11 September 2019 10:39, Jürg Billeter <j bitron ch> wrote:

On Wed, 2019-09-11 at 08:04 +0100, Daniel Silverstone via buildstream-list wrote:

On Tue, Sep 10, 2019 at 17:12:18 +0000, Benjamin Schubert wrote:

I therefore would propose to save its output to
'XDG_CONFIG_HOME/buildstream/buildbox-casd.log'. We would always append to
this file, and not erase it.

This has the potential to become large and surprising to users. Given it
is not configuration nor valuable except in the case of diagnosis, I'd
argue that it more properly belongs in $XDG_CACHE_HOME/buildstream
somewhere.

I agree, $XDG_CACHE_HOME is a better location.

Oups my bad, that's what I wanted to mean. We agree here


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?



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