aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-11-27 11:19:36 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-12-10 16:41:24 +0100
commita8f533b66417a1025a468cae3068bd2f5c06e811 (patch)
treeb37fc184dc14fe435ee1e467ac8df586e99b5e81
parent29fbc3cf31cb318931893b2113b6e394137ec153 (diff)
Add lvlNotice log level
This is like syslog's LOG_NOTICE: "normal, but significant, condition".
-rw-r--r--src/libutil/error.hh1
-rw-r--r--src/libutil/logging.hh1
-rw-r--r--src/nix/main.cc2
3 files changed, 3 insertions, 1 deletions
diff --git a/src/libutil/error.hh b/src/libutil/error.hh
index d1b6d82bb..aa4fadfcc 100644
--- a/src/libutil/error.hh
+++ b/src/libutil/error.hh
@@ -45,6 +45,7 @@ namespace nix {
typedef enum {
lvlError = 0,
lvlWarn,
+ lvlNotice,
lvlInfo,
lvlTalkative,
lvlChatty,
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh
index 82ba54051..96ad69790 100644
--- a/src/libutil/logging.hh
+++ b/src/libutil/logging.hh
@@ -198,6 +198,7 @@ extern Verbosity verbosity; /* suppress msgs > this */
} while (0)
#define printError(args...) printMsg(lvlError, args)
+#define notice(args...) printMsg(lvlNotice, args)
#define printInfo(args...) printMsg(lvlInfo, args)
#define printTalkative(args...) printMsg(lvlTalkative, args)
#define debug(args...) printMsg(lvlDebug, args)
diff --git a/src/nix/main.cc b/src/nix/main.cc
index fb3bffeaf..27b1d7257 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -250,7 +250,7 @@ void mainWrapped(int argc, char * * argv)
if (legacy) return legacy(argc, argv);
}
- verbosity = lvlWarn;
+ verbosity = lvlNotice;
settings.verboseBuild = false;
evalSettings.pureEval = true;