From 3a7f1573f23e4aa75eeb1bfe1ce24c1a55883f65 Mon Sep 17 00:00:00 2001 From: badaix Date: Tue, 28 Jan 2020 00:06:54 +0100 Subject: [PATCH] Less debug logging --- server/encoder/opus_encoder.cpp | 8 ++++---- server/streamreader/asio_stream.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/encoder/opus_encoder.cpp b/server/encoder/opus_encoder.cpp index 4cf6a9a8..168dc012 100644 --- a/server/encoder/opus_encoder.cpp +++ b/server/encoder/opus_encoder.cpp @@ -166,7 +166,7 @@ void OpusEncoder::initEncoder() // and encode the buffer content in the next iteration void OpusEncoder::encode(const msg::PcmChunk* chunk) { - LOG(DEBUG) << "encode " << chunk->duration().count() << "ms\n"; + // LOG(TRACE) << "encode " << chunk->duration().count() << "ms\n"; uint32_t offset = 0; // check if there is something left from the last call to encode and fill the remainder buffer to @@ -175,7 +175,7 @@ void OpusEncoder::encode(const msg::PcmChunk* chunk) { offset = std::min(static_cast(remainder_max_size_ - remainder_->payloadSize), chunk->payloadSize); memcpy(remainder_->payload + remainder_->payloadSize, chunk->payload, offset); - LOG(DEBUG) << "remainder buffer size: " << remainder_->payloadSize << "/" << remainder_max_size_ << ", appending " << offset << " bytes\n"; + // LOG(TRACE) << "remainder buffer size: " << remainder_->payloadSize << "/" << remainder_max_size_ << ", appending " << offset << " bytes\n"; remainder_->payloadSize += offset; if (remainder_->payloadSize < remainder_max_size_) @@ -196,7 +196,7 @@ void OpusEncoder::encode(const msg::PcmChunk* chunk) uint32_t bytes = ms2bytes(duration); while (chunk->payloadSize - offset >= bytes) { - LOG(DEBUG) << "encoding " << duration << "ms (" << bytes << "), offset: " << offset << ", chunk size: " << chunk->payloadSize - offset << "\n"; + // LOG(TRACE) << "encoding " << duration << "ms (" << bytes << "), offset: " << offset << ", chunk size: " << chunk->payloadSize - offset << "\n"; encode(chunk->format, chunk->payload + offset, bytes); offset += bytes; } @@ -222,7 +222,7 @@ void OpusEncoder::encode(const SampleFormat& format, const char* data, size_t si encoded_.resize(size); opus_int32 len = opus_encode(enc_, (opus_int16*)data, samples_per_channel, encoded_.data(), size); - LOG(DEBUG) << "Encode " << samples_per_channel << " frames, size " << size << " bytes, encoded: " << len << " bytes" << '\n'; + // LOG(TRACE) << "Encode " << samples_per_channel << " frames, size " << size << " bytes, encoded: " << len << " bytes" << '\n'; if (len > 0) { diff --git a/server/streamreader/asio_stream.hpp b/server/streamreader/asio_stream.hpp index c5dd79bd..3b2f70b3 100644 --- a/server/streamreader/asio_stream.hpp +++ b/server/streamreader/asio_stream.hpp @@ -103,7 +103,7 @@ void AsioStream::check_state() { uint64_t last_read = bytes_read_; wait(state_timer_, std::chrono::milliseconds(500 + chunk_ms_), [this, last_read] { - LOG(DEBUG, "AsioStream") << "check state last: " << last_read << ", read: " << bytes_read_ << "\n"; + LOG(TRACE, "AsioStream") << "check state last: " << last_read << ", read: " << bytes_read_ << "\n"; if (bytes_read_ != last_read) setState(ReaderState::kPlaying); else