Commit e17bcf25 authored by Julien Muchembled's avatar Julien Muchembled

Do not commit after every log entry when logging everything

parent aeeada3a
...@@ -150,6 +150,9 @@ class NEOLogger(Logger): ...@@ -150,6 +150,9 @@ class NEOLogger(Logger):
if filename: if filename:
self._db = sqlite3.connect(filename, check_same_thread=False) self._db = sqlite3.connect(filename, check_same_thread=False)
q = self._db.execute q = self._db.execute
if self._max_size is None:
q("PRAGMA synchronous = OFF")
q("PRAGMA journal_mode = MEMORY")
if reset: if reset:
for t in 'log', 'packet': for t in 'log', 'packet':
q('DROP TABLE IF EXISTS ' + t) q('DROP TABLE IF EXISTS ' + t)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment