summaryrefslogtreecommitdiffstats
path: root/src/build_log.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-09-19 04:25:32 (GMT)
committerNico Weber <nicolasweber@gmx.de>2014-09-19 04:25:32 (GMT)
commit213c44a51c1309f0b03a7c2763a7599c8cb9a41f (patch)
treefd9bd9ab4b5a973b0f777947093d3b6b949cbf6c /src/build_log.cc
parent2b63e14756f4b6132341e842fed26f034a921438 (diff)
downloadNinja-213c44a51c1309f0b03a7c2763a7599c8cb9a41f.zip
Ninja-213c44a51c1309f0b03a7c2763a7599c8cb9a41f.tar.gz
Ninja-213c44a51c1309f0b03a7c2763a7599c8cb9a41f.tar.bz2
Don't print "Recompacting..." message from tests.
Now tests don't print anything. Non-test behavior is unchanged.
Diffstat (limited to 'src/build_log.cc')
-rw-r--r--src/build_log.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/build_log.cc b/src/build_log.cc
index 3f24c16..b6f9874 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -102,7 +102,7 @@ BuildLog::LogEntry::LogEntry(const string& output, uint64_t command_hash,
{}
BuildLog::BuildLog()
- : log_file_(NULL), needs_recompaction_(false) {}
+ : log_file_(NULL), needs_recompaction_(false), quiet_(false) {}
BuildLog::~BuildLog() {
Close();
@@ -354,7 +354,8 @@ bool BuildLog::WriteEntry(FILE* f, const LogEntry& entry) {
bool BuildLog::Recompact(const string& path, const BuildLogUser& user,
string* err) {
METRIC_RECORD(".ninja_log recompact");
- printf("Recompacting log...\n");
+ if (!quiet_)
+ printf("Recompacting log...\n");
Close();
string temp_path = path + ".recompact";