You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2023/01/18 09:18:19 UTC

[GitHub] [incubator-pegasus] WHBANG commented on a diff in pull request #1318: refactor(log): use LOG_ERROR_F instead of LOG_ERROR (1/2)

WHBANG commented on code in PR #1318:
URL: https://github.com/apache/incubator-pegasus/pull/1318#discussion_r1073279592


##########
src/replica/replica_stub.cpp:
##########
@@ -1633,15 +1631,15 @@ void replica_stub::response_client(gpid id,
             _counter_recent_read_fail_count->increment();
         else
             _counter_recent_write_fail_count->increment();
-        LOG_ERROR("%s@%s: %s fail: client = %s, code = %s, timeout = %d, status = %s, error = %s",
-                  id.to_string(),
-                  _primary_address_str,
-                  is_read ? "read" : "write",
-                  request == nullptr ? "null" : request->header->from_address.to_string(),
-                  request == nullptr ? "null" : request->header->rpc_name,
-                  request == nullptr ? 0 : request->header->client.timeout_ms,
-                  enum_to_string(status),
-                  error.to_string());
+        LOG_ERROR_F("{}@{}: {} fail: client = {}, code = {}, timeout = {}, status = {}, error = {}",
+                    id,
+                    _primary_address_str,
+                    is_read ? "read" : "write",
+                    request == nullptr ? "null" : request->header->from_address,

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org