Adar Dembo has posted comments on this change.

Change subject: [tools]: Keep the verbosity of CLI at FATAL and above
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4447/1/src/kudu/tools/tool_main.cc
File src/kudu/tools/tool_main.cc:

PS1, Line 215:   // Set the verbosity of the commands to WARNING(2) and above.
             :   // If the user had explicitly specified verbosity, then user's
             :   // verbosity level is honored. Since '--v' depends on 
minloglevel
             :   // specifying either of them on CLI will override this setting.
             :   if 
(google::GetCommandLineFlagInfoOrDie("minloglevel").is_default &&
             :       google::GetCommandLineFlagInfoOrDie("v").is_default) {
             :     google::SetCommandLineOption("minloglevel",
             :                                  
SimpleItoa(google::GLOG_WARNING).c_str());
             :   }
> hrm, I disagree with the idea to not log WARNING/ERROR... isn't the whole p
It's difficult to corral INFO (and even WARNING) messages; they can come from 
all over the codebase, and ones that aren't useful in a CLI context may very 
well be useful when you're logging to a file.

My argument against is:
1. It's unusual to see this kind of logging (with timestamps, pid, line 
numbers, etc.) in a UNIX command-line tool, at least not by default
2. The returned Status should describe what went wrong at a high enough level 
that a user can understand what to do next (i.e. retry, give up, remediate this 
other thing first, etc.).
3. Most of the commands are read-only or idempotent, so it's easy to retry with 
--v or --minloglevel 0 to yield more descriptive errors. I'd liken this to my 
workflow with other UNIX tools like git: if I encounter an error and I want 
more information, I rerun the same command with debug logging enabled.


-- 
To view, visit http://gerrit.cloudera.org:8080/4447
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I882a340d4c1d205e4e998c888f487b7185000e3c
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dinesh Bhat <din...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <din...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to