Beginnings of getting a log in SQLite

Beginnings of a log in SQLite so it can be used for other things