Added some pretty SQL logging.