LPS-45492

Fix null pointer exception when logging time elapsed by always tracking time elapsed but only logging it if logging is enabled