Adding the SQL for the logger