Add option to enable query log and disable it by default
Fix tests after breaking BC by disabling query log by default