Flag-guard db session debug logging.