Revert "Reland "Implement RTC_DLOG macro and use in a few places to test.""
This reverts commit d6fc82f1739f33097d3d96f43ae14bcd1a70df93. Reason for revert: Breaks downstream Original change's description: > Reland "Implement RTC_DLOG macro and use in a few places to test." > > This is a reland of b18e868aa4375351cacd79efeb519b123878c39a > Original change's description: > > Implement RTC_DLOG macro and use in a few places to test. > > > > Bug: webrtc:8529 > > Change-Id: I31a5a4ec873088b1831dfa31a496467efff89cc1 > > Reviewed-on: https://webrtc-review.googlesource.com/23041 > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > Reviewed-by: Tommi <tommi@webrtc.org> > > Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#20690} > > Bug: webrtc:8529 > Change-Id: I68073870945f3085966e7a61fe6efa083eedd100 > Reviewed-on: https://webrtc-review.googlesource.com/23361 > Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> > Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#20725} TBR=solenberg@webrtc.org,kwiberg@webrtc.org,tommi@webrtc.org Change-Id: I8fc5d68e51947b038dddc4d7e5cef17b2932912e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:8529 Reviewed-on: https://webrtc-review.googlesource.com/24020 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20730}
This commit is contained in:
parent
c3ed630560
commit
c296255c7e
@ -61,12 +61,6 @@
|
||||
#include "rtc_base/constructormagic.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
|
||||
#if !defined(NDEBUG) || defined(DLOG_ALWAYS_ON)
|
||||
#define RTC_DLOG_IS_ON 1
|
||||
#else
|
||||
#define RTC_DLOG_IS_ON 0
|
||||
#endif
|
||||
|
||||
namespace rtc {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -301,8 +295,11 @@ class LogMessageVoidify {
|
||||
// The _F version prefixes the message with the current function name.
|
||||
#if (defined(__GNUC__) && !defined(NDEBUG)) || defined(WANT_PRETTY_LOG_F)
|
||||
#define RTC_LOG_F(sev) RTC_LOG(sev) << __PRETTY_FUNCTION__ << ": "
|
||||
#define RTC_LOG_T_F(sev) RTC_LOG(sev) << this << ": " \
|
||||
<< __PRETTY_FUNCTION__ << ": "
|
||||
#else
|
||||
#define RTC_LOG_F(sev) RTC_LOG(sev) << __FUNCTION__ << ": "
|
||||
#define RTC_LOG_T_F(sev) RTC_LOG(sev) << this << ": " << __FUNCTION__ << ": "
|
||||
#endif
|
||||
|
||||
#define RTC_LOG_CHECK_LEVEL(sev) \
|
||||
@ -363,22 +360,7 @@ inline bool LogCheckLevel(LoggingSeverity sev) {
|
||||
#define RTC_PLOG(sev, err) \
|
||||
RTC_LOG_ERR_EX(sev, err)
|
||||
|
||||
// The RTC_DLOG macros are equivalent to their RTC_LOG counterparts except that
|
||||
// they only generate code in debug builds.
|
||||
#if RTC_DLOG_IS_ON
|
||||
#define RTC_DLOG(sev) RTC_LOG(sev)
|
||||
#define RTC_DLOG_V(sev) RTC_LOG_V(sev)
|
||||
#define RTC_DLOG_F(sev) RTC_LOG_F(sev)
|
||||
#else
|
||||
#define RTC_DLOG_EAT_STREAM_PARAMS(sev) \
|
||||
(true ? true : ((void)(rtc::sev), true)) \
|
||||
? static_cast<void>(0) \
|
||||
: rtc::LogMessageVoidify() & \
|
||||
rtc::LogMessage(__FILE__, __LINE__, rtc::sev).stream()
|
||||
#define RTC_DLOG(sev) RTC_DLOG_EAT_STREAM_PARAMS(sev)
|
||||
#define RTC_DLOG_V(sev) RTC_DLOG_EAT_STREAM_PARAMS(sev)
|
||||
#define RTC_DLOG_F(sev) RTC_DLOG_EAT_STREAM_PARAMS(sev)
|
||||
#endif
|
||||
// TODO(?): Add an "assert" wrapper that logs in the same manner.
|
||||
|
||||
} // namespace rtc
|
||||
|
||||
|
||||
@ -32,8 +32,8 @@ TransmitMixer::Create(TransmitMixer*& mixer)
|
||||
mixer = new TransmitMixer();
|
||||
if (mixer == NULL)
|
||||
{
|
||||
RTC_DLOG(LS_ERROR) <<
|
||||
"TransmitMixer::Create() unable to allocate memory for mixer";
|
||||
RTC_LOG(LS_ERROR) << "TransmitMixer::Create() unable to allocate memory "
|
||||
"for mixer";
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@ -187,8 +187,8 @@ void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift,
|
||||
|
||||
GainControl* agc = audioproc_->gain_control();
|
||||
if (agc->set_stream_analog_level(current_mic_level) != 0) {
|
||||
RTC_DLOG(LS_ERROR) << "set_stream_analog_level failed: current_mic_level = "
|
||||
<< current_mic_level;
|
||||
RTC_LOG(LS_ERROR) << "set_stream_analog_level failed: current_mic_level = "
|
||||
<< current_mic_level;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift,
|
||||
|
||||
int err = audioproc_->ProcessStream(&_audioFrame);
|
||||
if (err != 0) {
|
||||
RTC_DLOG(LS_ERROR) << "ProcessStream() error: " << err;
|
||||
RTC_LOG(LS_ERROR) << "ProcessStream() error: " << err;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user