summaryrefslogtreecommitdiffstats
path: root/base/mac/mac_logging.h
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-10 02:11:46 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-10 02:11:46 +0000
commit050469561f88372c6b146c8e73efd9fbc6639d72 (patch)
tree5610e1030351f6be1ea8a17fe8bec77f2d3a9334 /base/mac/mac_logging.h
parent62bf48aeb139e753945e55f3c15d96ee45265fa8 (diff)
downloadchromium_src-050469561f88372c6b146c8e73efd9fbc6639d72.zip
chromium_src-050469561f88372c6b146c8e73efd9fbc6639d72.tar.gz
chromium_src-050469561f88372c6b146c8e73efd9fbc6639d72.tar.bz2
Use the new ScopedMachVM class and the MACH_LOG family of logging macros
where it makes sense to do so in existing code. This migration shook out a couple of bugs in mach_logging.h carried over from mac_logging.h (fixed there too). R=rsesek@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/278923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac/mac_logging.h')
-rw-r--r--base/mac/mac_logging.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/base/mac/mac_logging.h b/base/mac/mac_logging.h
index 02f205d..1081490 100644
--- a/base/mac/mac_logging.h
+++ b/base/mac/mac_logging.h
@@ -5,6 +5,8 @@
#ifndef BASE_MAC_MAC_LOGGING_H_
#define BASE_MAC_MAC_LOGGING_H_
+#include "base/base_export.h"
+#include "base/basictypes.h"
#include "base/logging.h"
#include "build/build_config.h"
@@ -43,6 +45,12 @@ class BASE_EXPORT OSStatusLogMessage : public logging::LogMessage {
} // namespace logging
+#if defined(NDEBUG)
+#define MAC_DVLOG_IS_ON(verbose_level) 0
+#else
+#define MAC_DVLOG_IS_ON(verbose_level) VLOG_IS_ON(verbose_level)
+#endif
+
#define OSSTATUS_LOG_STREAM(severity, status) \
COMPACT_GOOGLE_LOG_EX_ ## severity(OSStatusLogMessage, status).stream()
#define OSSTATUS_VLOG_STREAM(verbose_level, status) \
@@ -74,10 +82,10 @@ class BASE_EXPORT OSStatusLogMessage : public logging::LogMessage {
#define OSSTATUS_DVLOG(verbose_level, status) \
LAZY_STREAM(OSSTATUS_VLOG_STREAM(verbose_level, status), \
- DVLOG_IS_ON(verbose_level))
+ MAC_DVLOG_IS_ON(verbose_level))
#define OSSTATUS_DVLOG_IF(verbose_level, condition, status) \
- LAZY_STREAM(OSSTATUS_VLOG_STREAM(verbose_level, status) \
- DVLOG_IS_ON(verbose_level) && (condition))
+ LAZY_STREAM(OSSTATUS_VLOG_STREAM(verbose_level, status), \
+ MAC_DVLOG_IS_ON(verbose_level) && (condition))
#define OSSTATUS_DCHECK(condition, status) \
LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), \