Fix report of leaked memory during UTs by making the default logger static, and exclude a line from coverage