google/nsjail

Can we configure the only log most recent X entries in nsjail.log and dsicard the rest?

edwardt opened this issue · 1 comments

I am not sure fi there is a setting that let nsjail to limit or just retain the most recent entries of nsjail logs and recycle the older data.
It can eat up all the space.

You can maybe configure some tmpfs on your FS with a given size "mount -t tmpfs none /logs -o size=1024000', but doing a proper recycling of logs would require some additional code in nsjail.

As in, there's no easy OS primitive to achieve that, except maybe using RLIMIT_FSIZE but this would have side-effectts. And this would be no better than a tmpfs limited in size.

So, if anything, we'd need to implement a non-trivial code to do that. I'll give it a though, but it won't be high on our list of priorities.