You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2016/12/23 02:24:17 UTC
kudu git commit: KUDU-1812. Fix printed default of redaction flag for
tools
Repository: kudu
Updated Branches:
refs/heads/master a5a33b3ac -> 9efb2f864
KUDU-1812. Fix printed default of redaction flag for tools
A previous commit made the default redaction mode for tools get set
after parsing command line options. This means that "--help" would be
not have the correct default displayed.
This changes to using the appropriate gflags API to change the default
programatically.
Change-Id: I5f2535302122c8dc637c67cced88e77a47e62f15
Reviewed-on: http://gerrit.cloudera.org:8080/5574
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/9efb2f86
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/9efb2f86
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/9efb2f86
Branch: refs/heads/master
Commit: 9efb2f8640b8135a935fb3497282f48a3c13bd3a
Parents: a5a33b3
Author: Todd Lipcon <to...@apache.org>
Authored: Fri Dec 23 08:33:38 2016 +0700
Committer: Dan Burkert <da...@apache.org>
Committed: Fri Dec 23 02:23:46 2016 +0000
----------------------------------------------------------------------
src/kudu/tools/tool_main.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/9efb2f86/src/kudu/tools/tool_main.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/tool_main.cc b/src/kudu/tools/tool_main.cc
index d48d95e..a9dd0e7 100644
--- a/src/kudu/tools/tool_main.cc
+++ b/src/kudu/tools/tool_main.cc
@@ -222,14 +222,14 @@ static bool ParseCommandLineFlags(int* argc, char*** argv) {
}
int main(int argc, char** argv) {
+ // Disable redaction by default so that user data printed to the console will be shown
+ // in full.
+ CHECK_NE("", google::SetCommandLineOptionWithMode(
+ "log_redact_user_data", "false", google::SET_FLAGS_DEFAULT));
+
FLAGS_logtostderr = true;
bool show_help = ParseCommandLineFlags(&argc, &argv);
- if (google::GetCommandLineFlagInfoOrDie("log_redact_user_data").is_default) {
- // Disable redaction so that user data printed to the console will be shown in full.
- FLAGS_log_redact_user_data = false;
- }
-
kudu::InitGoogleLoggingSafe(argv[0]);
return kudu::tools::RunTool(argc, argv, show_help);
}