From 1eddee59f22b56a4b098921083780990dc1f0468 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Aug 2004 12:19:06 +0000 Subject: [PATCH] * The default verbosity level of all Nix commands is now lvlInfo. * Builder output is written to standard error by default. * The option `-B' is gone. * The option `-Q' suppresses builder output. The result of this is that most Nix invocations shouldn't need any flags w.r.t. logging. --- doc/manual/opt-common-syn.xml | 4 ++-- doc/manual/opt-common.xml | 13 ++++++------- src/libmain/shared.cc | 4 +++- src/libstore/globals.cc | 2 +- src/libutil/util.cc | 2 +- src/nix-env/main.cc | 3 --- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/doc/manual/opt-common-syn.xml b/doc/manual/opt-common-syn.xml index f848ad249..033189d0b 100644 --- a/doc/manual/opt-common-syn.xml +++ b/doc/manual/opt-common-syn.xml @@ -2,8 +2,8 @@ - - + + diff --git a/doc/manual/opt-common.xml b/doc/manual/opt-common.xml index db8a60eca..0cfd6ba21 100644 --- a/doc/manual/opt-common.xml +++ b/doc/manual/opt-common.xml @@ -50,7 +50,7 @@ Informational: print useful messages about what Nix is - doing. + doing. This is the default. @@ -94,14 +94,13 @@ - / + / - Causes the output written by build actions to standard output - and standard error to be echoed to standard error, regardless of - verbosity level. By default, it is only echoed at a verbosity - level of at least 4 (Debug), and is suppressed at - lower levels. Note that it is always written to a log file in + By default, output written by builders to standard output and + standard error is echoed to the Nix command's standard error. + This option suppresses this behaviour. Note that the builder's + standard output and error are always written to a log file in prefix/nix/var/log/nix. diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 6aad03a37..3f9b2a10d 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -126,7 +126,9 @@ static void initAndRun(int argc, char * * argv) setLogType(*i); } else if (arg == "--build-output" || arg == "-B") - buildVerbosity = lvlError; /* lowest */ + ; /* !!! obsolete - remove eventually */ + else if (arg == "--no-build-output" || arg == "-Q") + buildVerbosity = lvlVomit; else if (arg == "--help") { printHelp(); return; diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index aad26501b..44794d147 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -12,6 +12,6 @@ bool keepGoing = false; bool tryFallback = false; -Verbosity buildVerbosity = lvlDebug; +Verbosity buildVerbosity = lvlInfo; unsigned int maxBuildJobs = 1; diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 2a2dffb25..a25665e4a 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -243,7 +243,7 @@ void writeStringToFile(const Path & path, const string & s) LogType logType = ltPretty; -Verbosity verbosity = lvlError; +Verbosity verbosity = lvlInfo; static int nestingLevel = 0; diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index 8e5ba67e9..3700f4489 100644 --- a/src/nix-env/main.cc +++ b/src/nix-env/main.cc @@ -704,9 +704,6 @@ static void opDefaultExpr(Globals & globals, void run(Strings args) { - /* Use a higher default verbosity (lvlInfo). */ - verbosity = (Verbosity) ((int) verbosity + 1); - Strings opFlags, opArgs; Operation op = 0;