make sql debug logging configurable through an env var