Skip to content

Commit

Permalink
Add more logs for analysis (#523)
Browse files Browse the repository at this point in the history
<!-- Thanks for the contribution, this is awesome. -->

# PR Details
## Description
Add more terminal logs to catch http request from v2xhub to cloud. The
timestamp before the request and after successfully response from the
cloud.
<!--- Describe your changes in detail -->

## Related Issue
#515
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context
ERV verification testing metrics
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
NA
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [x] Defect fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that cause existing functionality
to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have added any new packages to the sonar-scanner.properties file
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
[V2XHUB Contributing
Guide](https://github.com/usdot-fhwa-OPS/V2X-Hub/blob/develop/Contributing.md)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
  • Loading branch information
dan-du-car authored Apr 26, 2023
1 parent 2793200 commit d0cb979
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,14 @@ namespace ERVCloudForwardingPlugin
curl_easy_setopt(req, CURLOPT_POSTFIELDS, local_msg.c_str());
curl_easy_setopt(req, CURLOPT_TIMEOUT_MS, 5000L); //Http request timeout in 5 seconds
curl_easy_setopt(req, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
PLOG(logDEBUG) << "Forwarding message to cloud via curl: " << local_msg << endl;
res = curl_easy_perform(req);
if (res != CURLE_OK)
{
fprintf(stderr, "curl send failed: %s\n", curl_easy_strerror(res));
return EXIT_FAILURE;
}else{
PLOG(logDEBUG) << "Successfully forward ERV BSM to cloud: " << local_msg << endl;
PLOG(logDEBUG) << "Successfully forwarded message to cloud via curl: " << local_msg << endl;
}
}
curl_easy_cleanup(req);
Expand Down

0 comments on commit d0cb979

Please sign in to comment.