Adding logger to generator

#253 Lemme know if this is what you had in mind.
Maybe we should format this slightly differently. If the SQL spans multiple lines it will look slightly odd.