Start using l4g, and fix a buggy log message
Allow log-level control at command-line
Check if last stamement is empty

With a trailing newline, Split gives us a final blank entry.
Don't dump all statments in DEBUG mode
Trace queries returned