logging to sqlite.