Allow enabling SQL logging in test mode with LOG_SQL