| 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 #ifndef BASE_MAC_MAC_LOGGING_H_ | 5 #ifndef BASE_MAC_MAC_LOGGING_H_ |
| 6 #define BASE_MAC_MAC_LOGGING_H_ | 6 #define BASE_MAC_MAC_LOGGING_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 #include <libkern/OSTypes.h> | 8 #include <libkern/OSTypes.h> |
| 10 | 9 |
| 11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 12 | 11 |
| 13 // Use the OSSTATUS_LOG family to log messages related to errors in Mac OS X | 12 // Use the OSSTATUS_LOG family to log messages related to errors in Mac OS X |
| 14 // system routines that report status via an OSStatus or OSErr value. It is | 13 // system routines that report status via an OSStatus or OSErr value. It is |
| 15 // similar to the PLOG family which operates on errno, but because there is no | 14 // similar to the PLOG family which operates on errno, but because there is no |
| 16 // global (or thread-local) OSStatus or OSErr value, the specific error must | 15 // global (or thread-local) OSStatus or OSErr value, the specific error must |
| 17 // be supplied as an argument to the OSSTATUS_LOG macro. The message logged | 16 // be supplied as an argument to the OSSTATUS_LOG macro. The message logged |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 #define OSSTATUS_DVLOG_IF(verbose_level, condition, status) \ | 73 #define OSSTATUS_DVLOG_IF(verbose_level, condition, status) \ |
| 75 LAZY_STREAM(OSSTATUS_VPLOG_STREAM(verbose_level, status) \ | 74 LAZY_STREAM(OSSTATUS_VPLOG_STREAM(verbose_level, status) \ |
| 76 DVLOG_IS_ON(verbose_level) && (condition)) | 75 DVLOG_IS_ON(verbose_level) && (condition)) |
| 77 | 76 |
| 78 #define OSSTATUS_DCHECK(condition, status) \ | 77 #define OSSTATUS_DCHECK(condition, status) \ |
| 79 LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), \ | 78 LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), \ |
| 80 DCHECK_IS_ON() && !(condition)) \ | 79 DCHECK_IS_ON() && !(condition)) \ |
| 81 << "Check failed: " # condition << ". " | 80 << "Check failed: " # condition << ". " |
| 82 | 81 |
| 83 #endif // BASE_MAC_MAC_LOGGING_H_ | 82 #endif // BASE_MAC_MAC_LOGGING_H_ |
| OLD | NEW |