Re: beagled runs in DEBUG by default?


On Tue, 2006-03-14 at 10:05 -0700, stephen o'grady wrote:
> because it's running in debug, beagle then fills my hd with log files
> after about a week or two of use - 13 GB's or so worth. 
> until i've figured out how to get it running not in debug, i'm no longer
> running it at startup (beagled was in GNOME Sessions).

Right now you have to patch the source.  In beagled/BeagleDaemon.cs
there's a chunk of code:

        Log.Initialize (PathFinder.LogDir,
                   // FIXME: We always turn on full debugging output!  We are still
                   // debugging this code, after all...
                   //arg_debug ? LogLevel.Debug : LogLevel.Warn,

If you uncomment the "arg_debug ? LogLevel.Debug : LogLevel.Warn" line
and remove the "LogLevel.Debug" line, it'll default to a lower warning
level when you don't run with --debug.

(There may be some confusion about --debug.  There is the --debug
argument that is passed to mono.  This has a small impact on performance
speed- and memory-wise, but gives us very useful debugging output when
something actually crashes, and it's still probably a good idea to have
on generally.  There is also the --debug option to Beagle, which would
set the debug log level.  It's that option that causes the logs to get

There is some logic in the Beagle daemon to clean up old logs when the
size gets big, but this only happens at startup, and if you have a
daemon running for, say, weeks at a time, it wouldn't really help you.

It's probably a good idea for distributions to ship with a patch to turn
down the debugging level.  I'm a little reluctant to do it upstream
because there are still bugs in the code that are extremely tough to
reproduce, and without good debugging output it's tough to track those


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