diff options
Diffstat (limited to 'src/translator/output_collector.cpp')
-rw-r--r-- | src/translator/output_collector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/translator/output_collector.cpp b/src/translator/output_collector.cpp index 76bc4cbb..078be232 100644 --- a/src/translator/output_collector.cpp +++ b/src/translator/output_collector.cpp @@ -79,13 +79,14 @@ void OutputCollector::Write(long sourceId, } } -StringCollector::StringCollector() : maxId_(-1) {} +StringCollector::StringCollector(bool quiet /*=false*/) : maxId_(-1), quiet_(quiet) {} void StringCollector::add(long sourceId, const std::string& best1, const std::string& bestn) { std::lock_guard<std::mutex> lock(mutex_); - LOG(info, "Best translation {} : {}", sourceId, best1); + if(!quiet_) + LOG(info, "Best translation {} : {}", sourceId, best1); outputs_[sourceId] = std::make_pair(best1, bestn); if(maxId_ <= sourceId) maxId_ = sourceId; |