| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MACH_LOGGING_H_ | 5 #ifndef BASE_MAC_MACH_LOGGING_H_ |
| 6 #define BASE_MAC_MACH_LOGGING_H_ | 6 #define BASE_MAC_MACH_LOGGING_H_ |
| 7 | 7 |
| 8 #include <mach/mach.h> | 8 #include <mach/mach.h> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \ | 84 LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \ |
| 85 DLOG_IS_ON(severity) && (condition)) | 85 DLOG_IS_ON(severity) && (condition)) |
| 86 | 86 |
| 87 #define MACH_DVLOG(verbose_level, mach_err) \ | 87 #define MACH_DVLOG(verbose_level, mach_err) \ |
| 88 LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \ | 88 LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \ |
| 89 MACH_DVLOG_IS_ON(verbose_level)) | 89 MACH_DVLOG_IS_ON(verbose_level)) |
| 90 #define MACH_DVLOG_IF(verbose_level, condition, mach_err) \ | 90 #define MACH_DVLOG_IF(verbose_level, condition, mach_err) \ |
| 91 LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \ | 91 LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \ |
| 92 MACH_DVLOG_IS_ON(verbose_level) && (condition)) | 92 MACH_DVLOG_IS_ON(verbose_level) && (condition)) |
| 93 | 93 |
| 94 #define MACH_DCHECK(condition, mach_err) \ | 94 #define MACH_DCHECK(condition, mach_err) \ |
| 95 LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), \ | 95 LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), \ |
| 96 DCHECK_IS_ON && !(condition)) \ | 96 DCHECK_IS_ON() && !(condition)) \ |
| 97 << "Check failed: " # condition << ". " | 97 << "Check failed: " #condition << ". " |
| 98 | 98 |
| 99 #if !defined(OS_IOS) | 99 #if !defined(OS_IOS) |
| 100 | 100 |
| 101 namespace logging { | 101 namespace logging { |
| 102 | 102 |
| 103 class BASE_EXPORT BootstrapLogMessage : public logging::LogMessage { | 103 class BASE_EXPORT BootstrapLogMessage : public logging::LogMessage { |
| 104 public: | 104 public: |
| 105 BootstrapLogMessage(const char* file_path, | 105 BootstrapLogMessage(const char* file_path, |
| 106 int line, | 106 int line, |
| 107 LogSeverity severity, | 107 LogSeverity severity, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \ | 150 LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \ |
| 151 DLOG_IS_ON(severity) && (condition)) | 151 DLOG_IS_ON(severity) && (condition)) |
| 152 | 152 |
| 153 #define BOOTSTRAP_DVLOG(verbose_level, bootstrap_err) \ | 153 #define BOOTSTRAP_DVLOG(verbose_level, bootstrap_err) \ |
| 154 LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \ | 154 LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \ |
| 155 BOOTSTRAP_DVLOG_IS_ON(verbose_level)) | 155 BOOTSTRAP_DVLOG_IS_ON(verbose_level)) |
| 156 #define BOOTSTRAP_DVLOG_IF(verbose_level, condition, bootstrap_err) \ | 156 #define BOOTSTRAP_DVLOG_IF(verbose_level, condition, bootstrap_err) \ |
| 157 LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \ | 157 LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \ |
| 158 BOOTSTRAP_DVLOG_IS_ON(verbose_level) && (condition)) | 158 BOOTSTRAP_DVLOG_IS_ON(verbose_level) && (condition)) |
| 159 | 159 |
| 160 #define BOOTSTRAP_DCHECK(condition, bootstrap_err) \ | 160 #define BOOTSTRAP_DCHECK(condition, bootstrap_err) \ |
| 161 LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), \ | 161 LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), \ |
| 162 DCHECK_IS_ON && !(condition)) \ | 162 DCHECK_IS_ON() && !(condition)) \ |
| 163 << "Check failed: " # condition << ". " | 163 << "Check failed: " #condition << ". " |
| 164 | 164 |
| 165 #endif // !OS_IOS | 165 #endif // !OS_IOS |
| 166 | 166 |
| 167 #endif // BASE_MAC_MACH_LOGGING_H_ | 167 #endif // BASE_MAC_MACH_LOGGING_H_ |
| OLD | NEW |