| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 #define LOG_GLE(sev) \ | 328 #define LOG_GLE(sev) \ |
| 329 LOG_GLE_EX(sev, GetLastError()) | 329 LOG_GLE_EX(sev, GetLastError()) |
| 330 #define LOG_GLEM(sev, mod) \ | 330 #define LOG_GLEM(sev, mod) \ |
| 331 LOG_E(sev, HRESULT, GetLastError(), mod) | 331 LOG_E(sev, HRESULT, GetLastError(), mod) |
| 332 #define LOG_ERR_EX(sev, err) \ | 332 #define LOG_ERR_EX(sev, err) \ |
| 333 LOG_GLE_EX(sev, err) | 333 LOG_GLE_EX(sev, err) |
| 334 #define LOG_ERR(sev) \ | 334 #define LOG_ERR(sev) \ |
| 335 LOG_GLE(sev) | 335 LOG_GLE(sev) |
| 336 #define LAST_SYSTEM_ERROR \ | 336 #define LAST_SYSTEM_ERROR \ |
| 337 (::GetLastError()) | 337 (::GetLastError()) |
| 338 #elif __native_client__ | 338 #elif defined(__native_client__) && __native_client__ |
| 339 #define LOG_ERR_EX(sev, err) \ | 339 #define LOG_ERR_EX(sev, err) \ |
| 340 LOG(sev) | 340 LOG(sev) |
| 341 #define LOG_ERR(sev) \ | 341 #define LOG_ERR(sev) \ |
| 342 LOG(sev) | 342 LOG(sev) |
| 343 #define LAST_SYSTEM_ERROR \ | 343 #define LAST_SYSTEM_ERROR \ |
| 344 (0) | 344 (0) |
| 345 #elif defined(WEBRTC_POSIX) | 345 #elif defined(WEBRTC_POSIX) |
| 346 #define LOG_ERR_EX(sev, err) \ | 346 #define LOG_ERR_EX(sev, err) \ |
| 347 LOG_ERRNO_EX(sev, err) | 347 LOG_ERRNO_EX(sev, err) |
| 348 #define LOG_ERR(sev) \ | 348 #define LOG_ERR(sev) \ |
| 349 LOG_ERRNO(sev) | 349 LOG_ERRNO(sev) |
| 350 #define LAST_SYSTEM_ERROR \ | 350 #define LAST_SYSTEM_ERROR \ |
| 351 (errno) | 351 (errno) |
| 352 #endif // WEBRTC_WIN | 352 #endif // WEBRTC_WIN |
| 353 | 353 |
| 354 #define LOG_TAG(sev, tag) \ | 354 #define LOG_TAG(sev, tag) \ |
| 355 LOG_SEVERITY_PRECONDITION(sev) \ | 355 LOG_SEVERITY_PRECONDITION(sev) \ |
| 356 rtc::LogMessage(NULL, 0, sev, tag).stream() | 356 rtc::LogMessage(NULL, 0, sev, tag).stream() |
| 357 | 357 |
| 358 #define PLOG(sev, err) \ | 358 #define PLOG(sev, err) \ |
| 359 LOG_ERR_EX(sev, err) | 359 LOG_ERR_EX(sev, err) |
| 360 | 360 |
| 361 // TODO(?): Add an "assert" wrapper that logs in the same manner. | 361 // TODO(?): Add an "assert" wrapper that logs in the same manner. |
| 362 | 362 |
| 363 #endif // LOG | 363 #endif // LOG |
| 364 | 364 |
| 365 } // namespace rtc | 365 } // namespace rtc |
| 366 | 366 |
| 367 #endif // WEBRTC_BASE_LOGGING_H_ | 367 #endif // WEBRTC_BASE_LOGGING_H_ |
| OLD | NEW |