You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/12/09 03:20:16 UTC

[GitHub] [incubator-kvrocks] git-hulk commented on a diff in pull request #1171: add config about logcleaner

git-hulk commented on code in PR #1171:
URL: https://github.com/apache/incubator-kvrocks/pull/1171#discussion_r1044056318


##########
src/config/config.cc:
##########
@@ -159,6 +159,7 @@ Config::Config() {
       {"migrate-sequence-gap", false, new IntField(&sequence_gap, 10000, 1, INT_MAX)},
       {"unixsocket", true, new StringField(&unixsocket, "")},
       {"unixsocketperm", true, new OctalField(&unixsocketperm, 0777, 1, INT_MAX)},
+      {"logcleanerday", false, new IntField(&logcleanerday, -1, -1, INT_MAX)},

Review Comment:
   We need to implement the callback function for this configuration if we expected to call to action when the value was changed. https://github.com/apache/incubator-kvrocks/blob/2ddb300b316486af20cb202c00d9c6e8fed27408/src/config/config.cc#L312



##########
kvrocks.conf:
##########
@@ -96,6 +96,15 @@ dir /tmp/kvrocks
 # We also can send logs to stdout/stderr is as simple as:
 #
 log-dir stdout
+# log-dir log
+
+# You can configure logcleanerday to control whether to enable logcleaner
+# and the maximum number of days that the INFO level logs will be kept.
+# if set logcleanerday to -1 , this mean disable logcleaner.
+# if set logcleanerday between 0 to INT_MAX , this mean enable logcleaner ,
+# and INFO level log file whose last modified time is greater than logcleanerday will be unlinked.
+# By default the logcleanerday is -1.
+logcleanerday -1

Review Comment:
   how about renaming it to `log-retention-days`



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