You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/01/22 09:37:06 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #9277: [C++] Fix ServerError is not converted to string in log

BewareMyPower opened a new pull request #9277:
URL: https://github.com/apache/pulsar/pull/9277


   Fixes #9211 
   
   ### Motivation
   
   In some code of C++ client, the protobuf generated `ServerError` is passed to `LOG_XXX` directly, so the logs only contain the enum integer value but not the description string. This PR is to fix it for more readable logs.
   
   ### Modifications
   
   The `ClientConnection.cc` already provides a `getResult` function for converting `ServerError` to `Result` , but some references of `ServerError` don't call the function. So this PR overrides `operator<<` for `ServerError` and convert it to `Result` in `LOG_XXX` macros that use `std::stringstream::operator<<` to serialize variables to string.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zymap commented on pull request #9277: [C++] Fix ServerError is not converted to string in log

Posted by GitBox <gi...@apache.org>.
zymap commented on pull request #9277:
URL: https://github.com/apache/pulsar/pull/9277#issuecomment-765960840


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat merged pull request #9277: [C++] Fix ServerError is not converted to string in log

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #9277:
URL: https://github.com/apache/pulsar/pull/9277


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #9277: [C++] Fix ServerError is not converted to string in log

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9277:
URL: https://github.com/apache/pulsar/pull/9277#issuecomment-765881885


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org