-
Notifications
You must be signed in to change notification settings - Fork 66
config: change redact log parameter name #547
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems redact-log
will be released in v4.0.10 and v5.0.0-rc
, please confirm @glorv .
LGTM |
lightning/log/log.go
Outdated
@@ -45,7 +45,7 @@ type Config struct { | |||
// Maximum number of old log files to retain. | |||
FileMaxBackups int `toml:"max-backups" json:"max-backups"` | |||
// Redact sensitive logs during the whole process | |||
RedactLog bool `toml:"redact-log" json:"redact-log"` | |||
RedactLog bool `toml:"redact-info-log" json:"redact-info-log"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to preserve compatibility for 5.0-rc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.0-rc doesn't have this feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we want to be consistent with PD it should be placed inside the [security]
section 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable.
lightning/config/global.go
Outdated
@@ -144,7 +144,7 @@ func LoadGlobalConfig(args []string, extraFlags func(*flag.FlagSet)) (*GlobalCon | |||
|
|||
logLevel := flagext.ChoiceVar(fs, "L", "", `log level: info, debug, warn, error, fatal (default info)`, "", "info", "debug", "warn", "warning", "error", "fatal") | |||
logFilePath := fs.String("log-file", "", "log file path") | |||
redactLog := fs.Bool("redact-log", false, "whether to redact sensitive info in log") | |||
redactLog := fs.Bool("redact-info-log", false, "whether to redact sensitive info in log") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to preserve compatibility for 5.0-rc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we also cherry-pick this commit to release-5.0-rc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should pick both this commit and #538 to 5.0-rc. But we can do it in next version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, we only need to cherry-pick this commit to release-4.0
LGTM |
* change redact log parameter name * address comment * update lightning.toml
* change redact log parameter name * address comment * update lightning.toml
What problem does this PR solve?
In #538, we added the
redact-log
parameter.The redact log parameter name is different from TiKV's and PD's.
https://github.com/tikv/tikv/blob/master/etc/config-template.toml#L846
In TiKV it's
redact-info-log
configuration in config file.https://github.com/tikv/pd/blob/master/server/config/config.go#L1373
In PD it's
redact-info-log
configuration in config file.What is changed and how it works?
Change
redact-log
toredact-info-log
.Check List
Tests
Side effects
Related changes