| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file overrides the logging macros in WebRTC (webrtc/base/logging.h). | 5 // This file overrides the logging macros in WebRTC (webrtc/base/logging.h). |
| 6 // Instead of using WebRTC's logging implementation, the WebRTC macros are | 6 // Instead of using WebRTC's logging implementation, the WebRTC macros are |
| 7 // mapped to DIAGNOSTIC_LOGING. In it's implementation (DiagnosticLogMessage in | 7 // mapped to DIAGNOSTIC_LOGING. In it's implementation (DiagnosticLogMessage in |
| 8 // third_party/webrtc_overrides/webrtc/base/logging.h), the corresponding | 8 // third_party/webrtc_overrides/webrtc/base/logging.h), the corresponding |
| 9 // base/logging.h macros (e.g. Chromium's VLOG) are used. | 9 // base/logging.h macros (e.g. Chromium's VLOG) are used. |
| 10 // If this file is included outside of WebRTC/libjingle it should be included | 10 // If this file is included outside of WebRTC/libjingle it should be included |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #include "third_party/webrtc_overrides/webrtc/base/diagnostic_logging.h" | 27 #include "third_party/webrtc_overrides/webrtc/base/diagnostic_logging.h" |
| 28 | 28 |
| 29 ////////////////////////////////////////////////////////////////////// | 29 ////////////////////////////////////////////////////////////////////// |
| 30 // WebRTC macros which in DiagnosticLogMessage are mapped over to | 30 // WebRTC macros which in DiagnosticLogMessage are mapped over to |
| 31 // their VLOG equivalent in base/logging.h. | 31 // their VLOG equivalent in base/logging.h. |
| 32 ////////////////////////////////////////////////////////////////////// | 32 ////////////////////////////////////////////////////////////////////// |
| 33 | 33 |
| 34 #if defined(LOGGING_INSIDE_WEBRTC) | 34 #if defined(LOGGING_INSIDE_WEBRTC) |
| 35 | 35 |
| 36 #include <errno.h> |
| 37 |
| 36 namespace rtc { | 38 namespace rtc { |
| 37 | 39 |
| 38 // Note that |N| is the size *with* the null terminator. | 40 // Note that |N| is the size *with* the null terminator. |
| 39 bool CheckVlogIsOnHelper(LoggingSeverity severity, | 41 bool CheckVlogIsOnHelper(LoggingSeverity severity, |
| 40 const char* file, size_t N); | 42 const char* file, size_t N); |
| 41 | 43 |
| 42 template <size_t N> | 44 template <size_t N> |
| 43 bool CheckVlogIsOn(LoggingSeverity severity, const char (&file)[N]) { | 45 bool CheckVlogIsOn(LoggingSeverity severity, const char (&file)[N]) { |
| 44 return CheckVlogIsOnHelper(severity, file, N); | 46 return CheckVlogIsOnHelper(severity, file, N); |
| 45 } | 47 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 #define LOG_ERR(sev) LOG_ERRNO(sev) | 86 #define LOG_ERR(sev) LOG_ERRNO(sev) |
| 85 #define LAST_SYSTEM_ERROR (errno) | 87 #define LAST_SYSTEM_ERROR (errno) |
| 86 #endif // OS_WIN | 88 #endif // OS_WIN |
| 87 | 89 |
| 88 #undef PLOG | 90 #undef PLOG |
| 89 #define PLOG(sev, err) LOG_ERR_EX(sev, err) | 91 #define PLOG(sev, err) LOG_ERR_EX(sev, err) |
| 90 | 92 |
| 91 #endif // LOGGING_INSIDE_WEBRTC | 93 #endif // LOGGING_INSIDE_WEBRTC |
| 92 | 94 |
| 93 #endif // THIRD_PARTY_WEBRTC_OVERRIDES_WEBRTC_BASE_LOGGING_H_ | 95 #endif // THIRD_PARTY_WEBRTC_OVERRIDES_WEBRTC_BASE_LOGGING_H_ |
| OLD | NEW |