Merge pull request #5879 from maelvls/structured-logs-deprecate

Deprecate klog flags and add a deprecation message
This commit is contained in:
jetstack-bot 2023-08-25 14:42:10 +02:00 committed by GitHub
commit 9ebc08cd64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,9 @@ func AddFlags(opts *logsapi.LoggingConfiguration, fs *pflag.FlagSet) {
switch f.Name {
case "add_dir_header", "alsologtostderr", "log_backtrace_at", "log_dir", "log_file", "log_file_max_size",
"logtostderr", "one_output", "skip_headers", "skip_log_headers", "stderrthreshold":
fs.AddGoFlag(f)
pf := pflag.PFlagFromGoFlag(f)
pf.Deprecated = "this flag may be removed in the future"
fs.AddFlag(pf)
}
})