Add SQL logging.