Stores logs in a SQL table