diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-06 18:16:31 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-06 18:16:31 +0000 |
commit | fb879b1a74abfb2acf03e54df4ca1035e06d7f55 (patch) | |
tree | 96b172c920aa258d866008d36741c71eba7a4ac8 /base/logging.h | |
parent | cd405660a90adcf24e7cb204e28d6dfa3a7ea487 (diff) | |
download | chromium_src-fb879b1a74abfb2acf03e54df4ca1035e06d7f55.zip chromium_src-fb879b1a74abfb2acf03e54df4ca1035e06d7f55.tar.gz chromium_src-fb879b1a74abfb2acf03e54df4ca1035e06d7f55.tar.bz2 |
Lower logging for expected errors in process_util_mac.mm
BUG=None
TEST=None
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77082 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.h')
-rw-r--r-- | base/logging.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/base/logging.h b/base/logging.h index b1bc0b0..baf8eb6 100644 --- a/base/logging.h +++ b/base/logging.h @@ -382,6 +382,23 @@ const LogSeverity LOG_0 = LOG_ERROR; LAZY_STREAM(VLOG_STREAM(verbose_level), \ VLOG_IS_ON(verbose_level) && (condition)) +#if defined (OS_WIN) +#define VPLOG_STREAM(verbose_level) \ + logging::Win32ErrorLogMessage(__FILE__, __LINE__, -verbose_level, \ + ::logging::GetLastSystemErrorCode()).stream() +#elif defined(OS_POSIX) +#define VPLOG_STREAM(verbose_level) \ + logging::ErrnoLogMessage(__FILE__, __LINE__, -verbose_level, \ + ::logging::GetLastSystemErrorCode()).stream() +#endif + +#define VPLOG(verbose_level) \ + LAZY_STREAM(VPLOG_STREAM(verbose_level), VLOG_IS_ON(verbose_level)) + +#define VPLOG_IF(verbose_level, condition) \ + LAZY_STREAM(VPLOG_STREAM(verbose_level), \ + VLOG_IS_ON(verbose_level) && (condition)) + // TODO(akalin): Add more VLOG variants, e.g. VPLOG. #define LOG_ASSERT(condition) \ @@ -539,6 +556,7 @@ DEFINE_CHECK_OP_IMPL(GT, > ) #define DLOG_ASSERT(condition) LOG_ASSERT(condition) #define DPLOG_IF(severity, condition) PLOG_IF(severity, condition) #define DVLOG_IF(verboselevel, condition) VLOG_IF(verboselevel, condition) +#define DVPLOG_IF(verboselevel, condition) VPLOG_IF(verboselevel, condition) #else // ENABLE_DLOG @@ -555,6 +573,7 @@ DEFINE_CHECK_OP_IMPL(GT, > ) #define DLOG_ASSERT(condition) DLOG_EAT_STREAM_PARAMETERS #define DPLOG_IF(severity, condition) DLOG_EAT_STREAM_PARAMETERS #define DVLOG_IF(verboselevel, condition) DLOG_EAT_STREAM_PARAMETERS +#define DVPLOG_IF(verboselevel, condition) DLOG_EAT_STREAM_PARAMETERS #endif // ENABLE_DLOG @@ -589,6 +608,8 @@ enum { DEBUG_MODE = ENABLE_DLOG }; #define DVLOG(verboselevel) DLOG_IF(INFO, VLOG_IS_ON(verboselevel)) +#define DVPLOG(verboselevel) DVPLOG_IF(verboselevel, VLOG_IS_ON(verboselevel)) + // Definitions for DCHECK et al. #if ENABLE_DCHECK |