miguelfreitas / twister-core

twister core / daemon
MIT License
1.42k stars 251 forks source link

Disable logfile #162

Open iShift opened 10 years ago

iShift commented 10 years ago

I have 10 MB debug.log file, i think we can disable log writing by default, it can increase twister speed and save space and I/O on HDD

10 MB for one month (!)

2014-02-24 9 33 42

kseistrup commented 10 years ago

Interim solution (at least for linux users):

$ cd ~/.twister/
$ rm -f debug.log && ln -s /dev/null debug.log

You can also put

shrinkdebugfile=1

in ~/.twister/twister.conf.

Or you can write a thin wrapper, say start-twisterd, around twisterd in order to truncate debug.log before twisterd is started, e.g.:

#!/bin/sh
: > ~/.twister/debug.log
exec twisterd "${@}"

Cheers.

kseistrup commented 10 years ago

PS: What's 10 MB these days?

iShift commented 10 years ago

@kseistrup i think we need option in config file to disable logs (by default)

kseistrup commented 10 years ago

@iShift, obviously — otherwise you wouldn't have submitted a ticket in the first place. All I was offering was a couple of ideas to how to remedy the situation until a solution is in place.

in·ter·im
/ˈintərəm/
adjective
  1. in or for the intervening period; provisional or temporary. “an interim arrangement”
     synonyms: provisional, temporary, pro tem, stopgap, short-term, fill-in, caretaker,
     acting, transitional, makeshift, improvised, impromptu
miguelfreitas commented 10 years ago

No objections from me.