acelyc111 commented on code in PR #1320:
URL: 
https://github.com/apache/incubator-pegasus/pull/1320#discussion_r1081126217


##########
src/meta/meta_backup_service.cpp:
##########
@@ -1363,10 +1357,10 @@ void backup_service::do_update_policy_to_remote_storage(
                            p.policy_name);
                 p_context_ptr->set_policy(p);
             } else if (err == ERR_TIMEOUT) {
-                LOG_ERROR("update backup policy to remote storage failed, 
policy_name = %s, retry "
-                          "after %" PRId64 "(ms)",
-                          p.policy_name.c_str(),
-                          _opt.meta_retry_delay_ms.count());
+                LOG_ERROR_F("update backup policy to remote storage failed, 
policy_name = {}, "
+                            "retry after {:#018x} (ms)",

Review Comment:
   ```suggestion
                               "retry after {} ms",
   ```



##########
src/meta/meta_backup_service.cpp:
##########
@@ -1329,9 +1324,8 @@ void backup_service::do_add_policy(dsn::message_ex *req,
                 }
                 p->start();
             } else if (err == ERR_TIMEOUT) {
-                LOG_ERROR("create backup policy on remote storage timeout, 
retry after %" PRId64
-                          "(ms)",
-                          _opt.meta_retry_delay_ms.count());
+                LOG_ERROR_F("create backup policy on remote storage timeout, 
retry after {} (ms)",

Review Comment:
   ```suggestion
                   LOG_ERROR_F("create backup policy on remote storage timeout, 
retry after {} ms",
   ```



##########
src/server/pegasus_server_impl.cpp:
##########
@@ -365,11 +359,9 @@ void pegasus_server_impl::on_multi_get(multi_get_rpc rpc)
     }
 
     if (!is_filter_type_supported(request.sort_key_filter_type)) {
-        LOG_ERROR("%s: invalid argument for multi_get from %s: "
-                  "sort key filter type %d not supported",
-                  replica_name(),
-                  rpc.remote_address().to_string(),
-                  request.sort_key_filter_type);
+        LOG_ERROR_F("invalid argument for multi_get from {}: sort key filter 
type {} not supported",

Review Comment:
   LOG_ERROR_PREFIX



##########
src/client/partition_resolver_simple.cpp:
##########
@@ -311,28 +311,18 @@ void 
partition_resolver_simple::query_config_reply(error_code err,
                 }
             }
         } else if (resp.err == ERR_OBJECT_NOT_FOUND) {
-            LOG_ERROR("%s.client: query config reply, gpid = %d.%d, err = %s",
-                      _app_name.c_str(),
-                      _app_id,
-                      partition_index,
-                      resp.err.to_string());
+            LOG_ERROR_PREFIX(
+                "query config reply, gpid = {}.{}, err = {}", _app_id, 
partition_index, resp.err);
 
             client_err = ERR_APP_NOT_EXIST;
         } else {
-            LOG_ERROR("%s.client: query config reply, gpid = %d.%d, err = %s",
-                      _app_name.c_str(),
-                      _app_id,
-                      partition_index,
-                      resp.err.to_string());
+            LOG_ERROR_PREFIX(
+                "query config reply, gpid = {}.{}, err = {}", _app_id, 
partition_index, resp.err);
 
             client_err = resp.err;
         }
     } else {
-        LOG_ERROR("%s.client: query config reply, gpid = %d.%d, err = %s",
-                  _app_name.c_str(),
-                  _app_id,
-                  partition_index,
-                  err.to_string());
+        LOG_ERROR_F("query config reply, gpid = {}.{}, err = {}", _app_id, 
partition_index, err);

Review Comment:
   LOG_ERROR_PREFIX



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to