mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Update RTC_LOG macro so it can be used when called from xyz::rtc namespaces
Similar to earlier CL https://webrtc-review.googlesource.com/c/src/+/169683. While this is a rather specific use case and solution, currently these macros are using a mix of styles ever since https://webrtc-review.googlesource.com/c/src/+/184934. By switching to ::rtc we can ensure that the right namespace is used. Bug: webrtc:11400 Change-Id: Id06f09b5224a399bd6b43bf0237422b24b5adfb1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312980 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40490}
This commit is contained in:
parent
5eb521955a
commit
d212551ad3
1 changed files with 7 additions and 7 deletions
|
@ -647,17 +647,17 @@ class LogMessage {
|
|||
::rtc::webrtc_logging_impl::LogStreamer<>() \
|
||||
<< ::rtc::webrtc_logging_impl::LogMetadata(file, line, sev)
|
||||
|
||||
#define RTC_LOG(sev) \
|
||||
!rtc::LogMessage::IsNoop<::rtc::sev>() && \
|
||||
#define RTC_LOG(sev) \
|
||||
!::rtc::LogMessage::IsNoop<::rtc::sev>() && \
|
||||
RTC_LOG_FILE_LINE(::rtc::sev, __FILE__, __LINE__)
|
||||
|
||||
#define RTC_LOG_IF(sev, condition) \
|
||||
!rtc::LogMessage::IsNoop<::rtc::sev>() && (condition) && \
|
||||
#define RTC_LOG_IF(sev, condition) \
|
||||
!::rtc::LogMessage::IsNoop<::rtc::sev>() && (condition) && \
|
||||
RTC_LOG_FILE_LINE(::rtc::sev, __FILE__, __LINE__)
|
||||
|
||||
// The _V version is for when a variable is passed in.
|
||||
#define RTC_LOG_V(sev) \
|
||||
!rtc::LogMessage::IsNoop(sev) && RTC_LOG_FILE_LINE(sev, __FILE__, __LINE__)
|
||||
!::rtc::LogMessage::IsNoop(sev) && RTC_LOG_FILE_LINE(sev, __FILE__, __LINE__)
|
||||
|
||||
// The _F version prefixes the message with the current function name.
|
||||
#if (defined(__GNUC__) && !defined(NDEBUG)) || defined(WANT_PRETTY_LOG_F)
|
||||
|
@ -681,7 +681,7 @@ inline bool LogCheckLevel(LoggingSeverity sev) {
|
|||
}
|
||||
|
||||
#define RTC_LOG_E(sev, ctx, err) \
|
||||
!rtc::LogMessage::IsNoop<::rtc::sev>() && \
|
||||
!::rtc::LogMessage::IsNoop<::rtc::sev>() && \
|
||||
::rtc::webrtc_logging_impl::LogCall() & \
|
||||
::rtc::webrtc_logging_impl::LogStreamer<>() \
|
||||
<< ::rtc::webrtc_logging_impl::LogMetadataErr { \
|
||||
|
@ -719,7 +719,7 @@ inline const char* AdaptString(const std::string& str) {
|
|||
} // namespace webrtc_logging_impl
|
||||
|
||||
#define RTC_LOG_TAG(sev, tag) \
|
||||
!rtc::LogMessage::IsNoop(sev) && \
|
||||
!::rtc::LogMessage::IsNoop(sev) && \
|
||||
::rtc::webrtc_logging_impl::LogCall() & \
|
||||
::rtc::webrtc_logging_impl::LogStreamer<>() \
|
||||
<< ::rtc::webrtc_logging_impl::LogMetadataTag { \
|
||||
|
|
Loading…
Reference in a new issue