You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "enjoy-binbin (via GitHub)" <gi...@apache.org> on 2023/07/26 07:24:36 UTC

[GitHub] [kvrocks] enjoy-binbin opened a new pull request, #1611: Support change log-level in runtime

enjoy-binbin opened a new pull request, #1611:
URL: https://github.com/apache/kvrocks/pull/1611

   Now we support config set log-level xxx to modify log-level
   in runtime.
   
   This closes #1610.


-- 
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: issues-unsubscribe@kvrocks.apache.org

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


[GitHub] [kvrocks] enjoy-binbin merged pull request #1611: Support change log-level in runtime

Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin merged PR #1611:
URL: https://github.com/apache/kvrocks/pull/1611


-- 
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: issues-unsubscribe@kvrocks.apache.org

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


[GitHub] [kvrocks] enjoy-binbin commented on a diff in pull request #1611: Support change log-level in runtime

Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin commented on code in PR #1611:
URL: https://github.com/apache/kvrocks/pull/1611#discussion_r1274638130


##########
src/config/config.cc:
##########
@@ -478,6 +478,12 @@ void Config::initFieldCallback() {
          if (cluster_enabled) srv->slot_migrator->SetSequenceGapLimit(sequence_gap);
          return Status::OK();
        }},
+      {"log-level",
+       [this](Server *srv, const std::string &k, const std::string &v) -> Status {
+         if (!srv) return Status::OK();
+         FLAGS_minloglevel = log_level;

Review Comment:
   ohh, i got it, this is new to me, thanks for the explanation.
   



-- 
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: issues-unsubscribe@kvrocks.apache.org

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


[GitHub] [kvrocks] mapleFU commented on a diff in pull request #1611: Support change log-level in runtime

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on code in PR #1611:
URL: https://github.com/apache/kvrocks/pull/1611#discussion_r1274625351


##########
src/config/config.cc:
##########
@@ -478,6 +478,12 @@ void Config::initFieldCallback() {
          if (cluster_enabled) srv->slot_migrator->SetSequenceGapLimit(sequence_gap);
          return Status::OK();
        }},
+      {"log-level",
+       [this](Server *srv, const std::string &k, const std::string &v) -> Status {
+         if (!srv) return Status::OK();
+         FLAGS_minloglevel = log_level;

Review Comment:
   Not so important, it will write a global variable, causing some cache invalid. But it's not important



-- 
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: issues-unsubscribe@kvrocks.apache.org

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


[GitHub] [kvrocks] mapleFU commented on a diff in pull request #1611: Support change log-level in runtime

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on code in PR #1611:
URL: https://github.com/apache/kvrocks/pull/1611#discussion_r1274607525


##########
src/config/config.cc:
##########
@@ -478,6 +478,12 @@ void Config::initFieldCallback() {
          if (cluster_enabled) srv->slot_migrator->SetSequenceGapLimit(sequence_gap);
          return Status::OK();
        }},
+      {"log-level",
+       [this](Server *srv, const std::string &k, const std::string &v) -> Status {
+         if (!srv) return Status::OK();
+         FLAGS_minloglevel = log_level;

Review Comment:
   just a nit, should we not change it when `FLAGS_minloglevel` and `log_level` is equal?



-- 
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: issues-unsubscribe@kvrocks.apache.org

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


[GitHub] [kvrocks] enjoy-binbin commented on a diff in pull request #1611: Support change log-level in runtime

Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin commented on code in PR #1611:
URL: https://github.com/apache/kvrocks/pull/1611#discussion_r1274621863


##########
src/config/config.cc:
##########
@@ -478,6 +478,12 @@ void Config::initFieldCallback() {
          if (cluster_enabled) srv->slot_migrator->SetSequenceGapLimit(sequence_gap);
          return Status::OK();
        }},
+      {"log-level",
+       [this](Server *srv, const std::string &k, const std::string &v) -> Status {
+         if (!srv) return Status::OK();
+         FLAGS_minloglevel = log_level;

Review Comment:
   i am not very familiar with this (the details), if it's the same, is there any side effect of changing it?



-- 
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: issues-unsubscribe@kvrocks.apache.org

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