Made logger output sql on a separate line, adding semicolon at the end.
All other data is prefixed with #. So the logger output should be valid
sql now.