[squeak-dev] unix log viewing technique that doesn't make colossal files?

Eliot Miranda eliot.miranda at gmail.com
Sun Dec 11 00:44:05 UTC 2022


Tim,

   rotate between log.1, log.2 … log.n. Once log.x reaches a certain size progress to the next in the sequence, wrapping back to 0 when on n. If on progressing the log already exists then delete it.

That way you have a maximum disc footprint, you keep the most recent n gb of logs, and it’s super simple. You can code this up in your sleep. forceNewFile: (sp?) is your friend…

_,,,^..^,,,_ (phone)

> On Dec 10, 2022, at 2:54 PM, tim Rowledge <tim at rowledge.org> wrote:
> 
> 
> 
>> On 2022-12-10, at 5:28 AM, Jakob Reschke <jakres+squeak at gmail.com> wrote:
>> 
>> Hi tim,
>> 
>> In what way is log rotation not applicable to your problem? It could compress or delete older log data regularly...
> 
> I may have misunderstood what it does; wouldn't be the first time. I get the impression it is intended for doing daily cleanup of system logs that don't grow as fast as my trace log does.
> I'm generating a gigabyte or more per hour, and I don't want (necessarily) to keep it, but to have a window of maybe 10-50Mb of the most recent that doesn't grow beyond some set limit.
>> 
>> About an external program, rsyslog comes to mind (has multiple sources and sinks for log data and can also do log rotation). There may be smaller solutions that I just don't know.
>> 
>> https://www.rsyslog.com/doc/v8-stable/tutorials/log_rotation_fix_size.html
> 
> Hmm, that reads like another slow-growing log solution.
> 
> What would be really helpful would be some thing to write to that behaves like a bucket of a certain size that get filled from the bottom and excess overflows from the top. Having a way to filter incoming text would be nice too; sometimes you don't want to see *all* the 'helpful' output. What is frustrating is that I feel sure that somebody is going to tell me of some completely obvious solution that is incredibly easy to find once you know what it is...
> 
> 
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Cloister: a pretentious clam
> 
> 
> 


More information about the Squeak-dev mailing list