logd: drop logs about pruning and compression to VERBOSE

These logs are not generally useful and can be considered to be spam
by some.  Drop them to VERBOSE so that we can be selectively enabled
when debugging logd.

Test: these logs do not appears by default.
Change-Id: Ic2bb12552d6f191478777c21f500794de29c8b0a
This commit is contained in:
Tom Cherry 2020-09-28 13:04:15 -07:00
parent b3dc6089b0
commit 4ab009f0e7
2 changed files with 6 additions and 5 deletions

View File

@ -113,8 +113,8 @@ void SerializedLogBuffer::MaybePrune(log_id_t log_id) {
if (total_size > max_size_[log_id]) {
Prune(log_id, total_size - max_size_[log_id], 0);
after_size = GetSizeUsed(log_id);
LOG(INFO) << "Pruned Logs from log_id: " << log_id << ", previous size: " << total_size
<< " after size: " << after_size;
LOG(VERBOSE) << "Pruned Logs from log_id: " << log_id << ", previous size: " << total_size
<< " after size: " << after_size;
}
stats_->set_overhead(log_id, after_size);

View File

@ -27,8 +27,9 @@ SerializedLogChunk::~SerializedLogChunk() {
void SerializedLogChunk::Compress() {
CHECK_EQ(compressed_log_.size(), 0U);
CompressionEngine::GetInstance().Compress(contents_, write_offset_, compressed_log_);
LOG(INFO) << "Compressed Log, buffer max size: " << contents_.size()
<< " size used: " << write_offset_ << " compressed size: " << compressed_log_.size();
LOG(VERBOSE) << "Compressed Log, buffer max size: " << contents_.size()
<< " size used: " << write_offset_
<< " compressed size: " << compressed_log_.size();
}
// TODO: Develop a better reference counting strategy to guard against the case where the writer is
@ -111,4 +112,4 @@ SerializedLogEntry* SerializedLogChunk::Log(uint64_t sequence, log_time realtime
write_offset_ += entry->total_len();
highest_sequence_number_ = sequence;
return entry;
}
}