5#ifndef ACCESSIBILITY_BASE_LOGGING_H_
6#define ACCESSIBILITY_BASE_LOGGING_H_
23 const char* condition,
27 std::ostream&
stream() {
return stream_; }
30 std::ostringstream stream_;
33 const bool killProcess_;
42#define BASE_LOG_STREAM() \
43 ::base::LogMessage(__FILE__, __LINE__, nullptr, false).stream()
45#define BASE_LAZY_STREAM(stream, condition) \
46 !(condition) ? (void)0 : ::base::LogMessageVoidify() & (stream)
48#define BASE_EAT_STREAM_PARAMETERS(ignored) \
51 : ::base::LogMessageVoidify() & \
52 ::base::LogMessage(0, 0, nullptr, !(ignored)).stream()
54#define BASE_LOG() BASE_LAZY_STREAM(BASE_LOG_STREAM(), true)
56#define BASE_CHECK(condition) \
58 ::base::LogMessage(__FILE__, __LINE__, #condition, true).stream(), \
62#define BASE_DLOG() BASE_LOG()
63#define BASE_DCHECK(condition) BASE_CHECK(condition)
65#define BASE_DLOG() BASE_EAT_STREAM_PARAMETERS(true)
66#define BASE_DCHECK(condition) BASE_EAT_STREAM_PARAMETERS(condition)
69#define BASE_UNREACHABLE() \
71 BASE_LOG() << "Reached unreachable code."; \
72 ::base::KillProcess(); \
void operator&(std::ostream &)
LogMessage(const char *file, int line, const char *condition, bool killProcess)