about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/config.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libutil/config.cc')
-rw-r--r--third_party/nix/src/libutil/config.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/third_party/nix/src/libutil/config.cc b/third_party/nix/src/libutil/config.cc
index d737945924e8..93550fafa3d6 100644
--- a/third_party/nix/src/libutil/config.cc
+++ b/third_party/nix/src/libutil/config.cc
@@ -1,6 +1,9 @@
+#define GOOGLE_STRIP_LOG 0
 #include "config.hh"
+#include <glog/logging.h>
 #include "args.hh"
 #include "json.hh"
+// #include <glog/log_severity.h>
 
 namespace nix {
 
@@ -30,9 +33,12 @@ void Config::addSetting(AbstractSetting* setting) {
   for (auto& alias : setting->aliases) {
     auto i = unknownSettings.find(alias);
     if (i != unknownSettings.end()) {
-      if (set)
-        warn("setting '%s' is set, but it's an alias of '%s' which is also set",
-             alias, setting->name);
+      if (set) {
+        LOG(WARNING) << "setting '" << alias
+                     << "' is set, but it's an alias of '" << setting->name
+                     << "', which is also set";
+      }
+
       else {
         setting->set(i->second);
         setting->overriden = true;
@@ -44,7 +50,9 @@ void Config::addSetting(AbstractSetting* setting) {
 }
 
 void AbstractConfig::warnUnknownSettings() {
-  for (auto& s : unknownSettings) warn("unknown setting '%s'", s.first);
+  for (auto& s : unknownSettings) {
+    LOG(WARNING) << "unknown setting: " << s.first;
+  }
 }
 
 void AbstractConfig::reapplyUnknownSettings() {