about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/exec.cc2
-rw-r--r--src/libstore/globals.cc2
-rw-r--r--src/libstore/globals.hh4
3 files changed, 7 insertions, 1 deletions
diff --git a/src/libstore/exec.cc b/src/libstore/exec.cc
index 2adf03841c4f..b25423b4449a 100644
--- a/src/libstore/exec.cc
+++ b/src/libstore/exec.cc
@@ -22,7 +22,7 @@ void runProgram(const string & program,
 {
     /* Create a log file. */
     string logCommand = 
-	verbosity >= lvlDebug 
+	verbosity >= buildVerbosity 
 	? "tee "  + logFileName + " >&2"
 	: "cat > " + logFileName;
     /* !!! auto-pclose on exit */
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index e5d76ff48563..b3c658c29562 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -7,3 +7,5 @@ string nixStateDir = "/UNINIT";
 string nixDBPath = "/UNINIT";
 
 bool keepFailed = false;
+
+Verbosity buildVerbosity = lvlDebug;
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 3da294cc829a..5d5e9efcfec5 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -2,6 +2,7 @@
 #define __GLOBALS_H
 
 #include <string>
+#include "util.hh"
 
 using namespace std;
 
@@ -28,5 +29,8 @@ extern string nixDBPath;
 /* Whether to keep temporary directories of failed builds. */
 extern bool keepFailed;
 
+/* Verbosity level for build output. */
+extern Verbosity buildVerbosity;
+
 
 #endif /* !__GLOBALS_H */