PRD-4921 - Limit logging if not in debug mode.