* 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.
This commit is contained in:
Eelco Dolstra 2004-08-18 12:19:06 +00:00
parent 937ce0cd21
commit 1eddee59f2
6 changed files with 13 additions and 15 deletions

View file

@ -2,8 +2,8 @@
<arg><option>--version</option></arg> <arg><option>--version</option></arg>
<arg rep='repeat'><option>--verbose</option></arg> <arg rep='repeat'><option>--verbose</option></arg>
<arg rep='repeat'><option>-v</option></arg> <arg rep='repeat'><option>-v</option></arg>
<arg><option>--build-output</option></arg> <arg><option>--no-build-output</option></arg>
<arg><option>-B</option></arg> <arg><option>-Q</option></arg>
<arg> <arg>
<group choice='req'> <group choice='req'>
<arg choice='plain'><option>--max-jobs</option></arg> <arg choice='plain'><option>--max-jobs</option></arg>

View file

@ -50,7 +50,7 @@
<para> <para>
<quote>Informational</quote>: print <quote>Informational</quote>: print
<emphasis>useful</emphasis> messages about what Nix is <emphasis>useful</emphasis> messages about what Nix is
doing. doing. This is the default.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -94,14 +94,13 @@
<varlistentry> <varlistentry>
<term><option>--build-output</option> / <option>-B</option></term> <term><option>--no-build-output</option> / <option>-Q</option></term>
<listitem> <listitem>
<para> <para>
Causes the output written by build actions to standard output By default, output written by builders to standard output and
and standard error to be echoed to standard error, regardless of standard error is echoed to the Nix command's standard error.
verbosity level. By default, it is only echoed at a verbosity This option suppresses this behaviour. Note that the builder's
level of at least 4 (<quote>Debug</quote>), and is suppressed at standard output and error are always written to a log file in
lower levels. Note that it is always written to a log file in
<filename><replaceable>prefix</replaceable>/nix/var/log/nix</filename>. <filename><replaceable>prefix</replaceable>/nix/var/log/nix</filename>.
</para> </para>
</listitem> </listitem>

View file

@ -126,7 +126,9 @@ static void initAndRun(int argc, char * * argv)
setLogType(*i); setLogType(*i);
} }
else if (arg == "--build-output" || arg == "-B") 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") { else if (arg == "--help") {
printHelp(); printHelp();
return; return;

View file

@ -12,6 +12,6 @@ bool keepGoing = false;
bool tryFallback = false; bool tryFallback = false;
Verbosity buildVerbosity = lvlDebug; Verbosity buildVerbosity = lvlInfo;
unsigned int maxBuildJobs = 1; unsigned int maxBuildJobs = 1;

View file

@ -243,7 +243,7 @@ void writeStringToFile(const Path & path, const string & s)
LogType logType = ltPretty; LogType logType = ltPretty;
Verbosity verbosity = lvlError; Verbosity verbosity = lvlInfo;
static int nestingLevel = 0; static int nestingLevel = 0;

View file

@ -704,9 +704,6 @@ static void opDefaultExpr(Globals & globals,
void run(Strings args) void run(Strings args)
{ {
/* Use a higher default verbosity (lvlInfo). */
verbosity = (Verbosity) ((int) verbosity + 1);
Strings opFlags, opArgs; Strings opFlags, opArgs;
Operation op = 0; Operation op = 0;