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/17 11:49:25 UTC

[GitHub] [incubator-pegasus] WHBANG opened a new pull request, #1316: refactor(log): use LOG_WARNING_F instead of LOG_WARNING (2/3)

WHBANG opened a new pull request, #1316:
URL: https://github.com/apache/incubator-pegasus/pull/1316

   ### What problem does this PR solve? <!--add issue link with summary if exists-->
   https://github.com/apache/incubator-pegasus/issues/1305
   
   This patch aim to use LOG_WARNING_F instead of LOG_WARNING. Includes:
   
   Use LOG_WARNING_F instead of LOG_WARNING in meta module.
   


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


[GitHub] [incubator-pegasus] acelyc111 merged pull request #1316: refactor(log): use LOG_WARNING_F instead of LOG_WARNING (2/3)

Posted by GitBox <gi...@apache.org>.
acelyc111 merged PR #1316:
URL: https://github.com/apache/incubator-pegasus/pull/1316


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


[GitHub] [incubator-pegasus] empiredan commented on a diff in pull request #1316: refactor(log): use LOG_WARNING_F instead of LOG_WARNING (2/3)

Posted by GitBox <gi...@apache.org>.
empiredan commented on code in PR #1316:
URL: https://github.com/apache/incubator-pegasus/pull/1316#discussion_r1073112501


##########
src/meta/meta_backup_service.cpp:
##########
@@ -1545,8 +1546,7 @@ void backup_service::modify_backup_policy(configuration_modify_backup_policy_rpc
                 LOG_INFO_F("{}: remove app({}) to policy", cur_policy.policy_name, appid);
                 have_modify_policy = true;
             } else {
-                LOG_WARNING(
-                    "%s: invalid app_id(%d)", cur_policy.policy_name.c_str(), (int32_t)appid);
+                LOG_WARNING_F("{}: invalid app_id({})", cur_policy.policy_name, (int32_t)appid);

Review Comment:
   ```suggestion
                   LOG_WARNING_F("{}: invalid app_id({})", cur_policy.policy_name, appid);
   ```



##########
src/meta/meta_backup_service.cpp:
##########
@@ -1560,9 +1560,9 @@ void backup_service::modify_backup_policy(configuration_modify_backup_policy_rpc
             cur_policy.backup_interval_seconds = request.new_backup_interval_sec;
             have_modify_policy = true;
         } else {
-            LOG_WARNING("%s: invalid backup_interval_sec(%" PRId64 ")",
-                        cur_policy.policy_name.c_str(),
-                        request.new_backup_interval_sec);
+            LOG_WARNING_F("{}: invalid backup_interval_sec({})",
+                          cur_policy.policy_name.c_str(),

Review Comment:
   ```suggestion
                             cur_policy.policy_name,
   ```



##########
src/meta/server_state.cpp:
##########
@@ -1796,15 +1792,14 @@ void server_state::downgrade_primary_to_inactive(std::shared_ptr<app_state> &app
                          "app({}) not in dropping state ({})",
                          app->get_logname(),
                          enum_to_string(app->status));
-            LOG_WARNING(
-                "stop downgrade primary as the partitions(%d.%d) is dropping", app->app_id, pidx);
+            LOG_WARNING_F(
+                "stop downgrade primary as the partitions({}.{}) is dropping", app->app_id, pidx);
             return;
         } else {
-            LOG_WARNING("gpid(%d.%d) is syncing another request with remote, cancel it due to the "
-                        "primary(%s) is down",
-                        pc.pid.get_app_id(),
-                        pc.pid.get_partition_index(),
-                        pc.primary.to_string());
+            LOG_WARNING_F("gpid({}) is syncing another request with remote, cancel it due to the "
+                          "primary({}) is down",
+                          pc.pid.get_app_id(),

Review Comment:
   ```suggestion
                             pc.pid,
   ```



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


[GitHub] [incubator-pegasus] WHBANG commented on pull request #1316: refactor(log): use LOG_WARNING_F instead of LOG_WARNING (2/3)

Posted by GitBox <gi...@apache.org>.
WHBANG commented on PR #1316:
URL: https://github.com/apache/incubator-pegasus/pull/1316#issuecomment-1386547858

   @neverchanje hi, can you check this pr again, thank you very much.


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