You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2021/01/23 18:14:58 UTC
[pulsar] branch master updated: Fix ServerError is not converted to
string in log (#9277)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new daa79de Fix ServerError is not converted to string in log (#9277)
daa79de is described below
commit daa79dec24b4133128db1689d3c04355eb7a24a5
Author: Yunze Xu <xy...@163.com>
AuthorDate: Sun Jan 24 02:14:15 2021 +0800
Fix ServerError is not converted to string in log (#9277)
---
pulsar-client-cpp/lib/ClientConnection.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pulsar-client-cpp/lib/ClientConnection.cc b/pulsar-client-cpp/lib/ClientConnection.cc
index b4d1bd1..69f889c 100644
--- a/pulsar-client-cpp/lib/ClientConnection.cc
+++ b/pulsar-client-cpp/lib/ClientConnection.cc
@@ -136,6 +136,11 @@ static Result getResult(ServerError serverError) {
return ResultUnknownError;
}
+inline std::ostream& operator<<(std::ostream& os, ServerError error) {
+ os << getResult(error);
+ return os;
+}
+
static bool file_exists(const std::string& path) {
if (path.empty()) {
return false;