about summary refs log tree commit diff
path: root/third_party/nix/src/libmain/common-args.cc
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-19T00·03+0100
committerVincent Ambo <tazjin@google.com>2020-05-19T00·04+0100
commitd0c44425e147ab7d38410f400825ad20da15037b (patch)
treefc274eeb9c1a35d43cf4bb9383229e36ff094245 /third_party/nix/src/libmain/common-args.cc
parent505b6b044b132b28e1501491bcfe6bd68ca1989e (diff)
refactor(3p/nix/libmain): Replace logging.h with glog r/757
Diffstat (limited to 'third_party/nix/src/libmain/common-args.cc')
-rw-r--r--third_party/nix/src/libmain/common-args.cc21
1 files changed, 2 insertions, 19 deletions
diff --git a/third_party/nix/src/libmain/common-args.cc b/third_party/nix/src/libmain/common-args.cc
index e4c7c6daf6a5..bbd73cc840fa 100644
--- a/third_party/nix/src/libmain/common-args.cc
+++ b/third_party/nix/src/libmain/common-args.cc
@@ -1,4 +1,5 @@
 #include "common-args.hh"
+#include <glog/logging.h>
 #include "globals.hh"
 
 namespace nix {
@@ -6,24 +7,6 @@ namespace nix {
 MixCommonArgs::MixCommonArgs(const string& programName)
     : programName(programName) {
   mkFlag()
-      .longName("verbose")
-      .shortName('v')
-      .description("increase verbosity level")
-      .handler([]() { verbosity = (Verbosity)(verbosity + 1); });
-
-  mkFlag()
-      .longName("quiet")
-      .description("decrease verbosity level")
-      .handler([]() {
-        verbosity =
-            verbosity > lvlError ? (Verbosity)(verbosity - 1) : lvlError;
-      });
-
-  mkFlag().longName("debug").description("enable debug output").handler([]() {
-    verbosity = lvlDebug;
-  });
-
-  mkFlag()
       .longName("option")
       .labels({"name", "value"})
       .description("set a Nix configuration option (overriding nix.conf)")
@@ -32,7 +15,7 @@ MixCommonArgs::MixCommonArgs(const string& programName)
         try {
           globalConfig.set(ss[0], ss[1]);
         } catch (UsageError& e) {
-          warn(e.what());
+          LOG(WARNING) << e.what();
         }
       });