OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 libjingle (talk/base/logging.h). | 5 // This file overrides the logging macros in libjingle (talk/base/logging.h). |
6 // Instead of using libjingle's logging implementation, the libjingle macros are | 6 // Instead of using libjingle's logging implementation, the libjingle macros are |
7 // mapped to the corresponding base/logging.h macro (chromium's VLOG). | 7 // mapped to the corresponding base/logging.h macro (chromium's VLOG). |
8 // If this file is included outside of libjingle (e.g. in wrapper code) it | 8 // If this file is included outside of libjingle (e.g. in wrapper code) it |
9 // should be included after base/logging.h (if any) or compiler error or | 9 // should be included after base/logging.h (if any) or compiler error or |
10 // unexpected behavior may occur (macros that have the same name in libjingle as | 10 // unexpected behavior may occur (macros that have the same name in libjingle as |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 | 180 |
181 #define DIAGNOSTIC_LOG(sev) \ | 181 #define DIAGNOSTIC_LOG(sev) \ |
182 talk_base::DiagnosticLogMessage( \ | 182 talk_base::DiagnosticLogMessage( \ |
183 __FILE__, __LINE__, sev, VLOG_IS_ON(sev)).stream() | 183 __FILE__, __LINE__, sev, VLOG_IS_ON(sev)).stream() |
184 | 184 |
185 #define LOG_CHECK_LEVEL(sev) VLOG_IS_ON(talk_base::sev) | 185 #define LOG_CHECK_LEVEL(sev) VLOG_IS_ON(talk_base::sev) |
186 #define LOG_CHECK_LEVEL_V(sev) VLOG_IS_ON(sev) | 186 #define LOG_CHECK_LEVEL_V(sev) VLOG_IS_ON(sev) |
187 | 187 |
188 #define LOG_V(sev) VLOG(sev) | 188 #define LOG_V(sev) VLOG(sev) |
189 #undef LOG | 189 #undef LOG |
190 #define LOG(sev) LOG_V(talk_base::sev) | 190 //#define LOG(sev) LOG_V(talk_base::sev) |
Jói
2013/04/26 12:55:10
I presume this is temporary?
Henrik Grunell
2013/04/29 17:58:19
Yes.
| |
191 #define LOG(sev) DIAGNOSTIC_LOG(talk_base::sev) | |
191 | 192 |
192 // The _F version prefixes the message with the current function name. | 193 // The _F version prefixes the message with the current function name. |
193 #if defined(__GNUC__) && defined(_DEBUG) | 194 #if defined(__GNUC__) && defined(_DEBUG) |
194 #define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " | 195 #define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " |
195 #else | 196 #else |
196 #define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": " | 197 #define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": " |
197 #endif | 198 #endif |
198 | 199 |
199 // This macro wrapps the LAZY_STREAM macro from base/logging.h but flips the | 200 // This macro wrapps the LAZY_STREAM macro from base/logging.h but flips the |
200 // order of the parameters. This is necessary since some compilers will fail | 201 // order of the parameters. This is necessary since some compilers will fail |
(...skipping 25 matching lines...) Expand all Loading... | |
226 #define LOG_ERR(sev) LOG_ERRNO(sev) | 227 #define LOG_ERR(sev) LOG_ERRNO(sev) |
227 #define LAST_SYSTEM_ERROR (errno) | 228 #define LAST_SYSTEM_ERROR (errno) |
228 #endif // OS_WIN | 229 #endif // OS_WIN |
229 | 230 |
230 #undef PLOG | 231 #undef PLOG |
231 #define PLOG(sev, err) LOG_ERR_EX(sev, err) | 232 #define PLOG(sev, err) LOG_ERR_EX(sev, err) |
232 | 233 |
233 #endif // LOGGING_INSIDE_LIBJINGLE | 234 #endif // LOGGING_INSIDE_LIBJINGLE |
234 | 235 |
235 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_TALK_BASE_LOGGING_H_ | 236 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_TALK_BASE_LOGGING_H_ |
OLD | NEW |