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:
parent
b3dc6089b0
commit
4ab009f0e7
|
@ -113,8 +113,8 @@ void SerializedLogBuffer::MaybePrune(log_id_t log_id) {
|
||||||
if (total_size > max_size_[log_id]) {
|
if (total_size > max_size_[log_id]) {
|
||||||
Prune(log_id, total_size - max_size_[log_id], 0);
|
Prune(log_id, total_size - max_size_[log_id], 0);
|
||||||
after_size = GetSizeUsed(log_id);
|
after_size = GetSizeUsed(log_id);
|
||||||
LOG(INFO) << "Pruned Logs from log_id: " << log_id << ", previous size: " << total_size
|
LOG(VERBOSE) << "Pruned Logs from log_id: " << log_id << ", previous size: " << total_size
|
||||||
<< " after size: " << after_size;
|
<< " after size: " << after_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
stats_->set_overhead(log_id, after_size);
|
stats_->set_overhead(log_id, after_size);
|
||||||
|
|
|
@ -27,8 +27,9 @@ SerializedLogChunk::~SerializedLogChunk() {
|
||||||
void SerializedLogChunk::Compress() {
|
void SerializedLogChunk::Compress() {
|
||||||
CHECK_EQ(compressed_log_.size(), 0U);
|
CHECK_EQ(compressed_log_.size(), 0U);
|
||||||
CompressionEngine::GetInstance().Compress(contents_, write_offset_, compressed_log_);
|
CompressionEngine::GetInstance().Compress(contents_, write_offset_, compressed_log_);
|
||||||
LOG(INFO) << "Compressed Log, buffer max size: " << contents_.size()
|
LOG(VERBOSE) << "Compressed Log, buffer max size: " << contents_.size()
|
||||||
<< " size used: " << write_offset_ << " compressed size: " << compressed_log_.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
|
// 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();
|
write_offset_ += entry->total_len();
|
||||||
highest_sequence_number_ = sequence;
|
highest_sequence_number_ = sequence;
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue