mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
turn off buffering on crash log, and log gc start/finish
This commit is contained in:
parent
ed07a147f9
commit
864fbdf469
1 changed files with 3 additions and 1 deletions
|
|
@ -1180,14 +1180,16 @@ Please ensure a profile is open and Anki is not busy, then try again."""),
|
||||||
|
|
||||||
def doGC(self):
|
def doGC(self):
|
||||||
assert not self.progress.inDB
|
assert not self.progress.inDB
|
||||||
|
self._crashLog.write(b"gc started at %d\n" % time.time())
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
self._crashLog.write(b"gc finished\n")
|
||||||
|
|
||||||
# Crash log
|
# Crash log
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
def setupCrashLog(self):
|
def setupCrashLog(self):
|
||||||
p = os.path.join(self.pm.base, "crash.log")
|
p = os.path.join(self.pm.base, "crash.log")
|
||||||
self._crashLog = open(p, "a")
|
self._crashLog = open(p, "ab", 0)
|
||||||
faulthandler.enable(self._crashLog)
|
faulthandler.enable(self._crashLog)
|
||||||
|
|
||||||
# Media server
|
# Media server
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue