Re: Giant logfile


> First, there are always old log files floating around in the Log directory.
> Do we really need them ?

This is a good question. I am in favour of turning off the debug flag
in the "release" build (i.e. the installed one). Instead debugging can
be turned on when running uninstalled or by using some environment
variable. Though debugging helps and some hard to find bugs were found
because some users had the debugging enabled, the cost users pay is
too much.

Besides, which production ready software has debugging turned on ;-) ?

> Second, the current log file should be limited in size. I've found the
> following Java code snippet on the Web:
> This could give an idea how to do it (not tested !).
> However, if it reaches a certain size, it should be deleted. And a new one
> created. Or keep one or more (but limited in number) in compressed backups.
> Similar what happens to the /var/log/messages on a Linux box. There are bz2
> compressed backups. I've just tried it with one of my beagle IndexHelper
> log files: 8MB down to 300k, compress ratio > 20.

I thought about this too and I am still debating if this is a good
idea. Old log files are automatically deleted, so if a large log file
appears then its mostly due to some looping bug (all the known ones
are fixed but there might be new ones) in which case the single file
will keep on growing and growing ... how much compression will help ?!
The other approach, i.e. creating a new file and removing/compressing
the old one - how will that work too in above situation when the user
is caught in some looping bug ?!
One view we can adopt is not treat the symptom but eliminate all
sources of looping, but but ... we are trying our best and corner
cases seem to pop up from time to time :(

Personally, I prefer the first option (turn off debug by default with
ways to turn it on while beagled is running).

- dBera

Debajyoti Bera @
beagle / KDE fan
Mandriva / Inspiron-1100 user

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