Conditionally define BPLOG_IF

This allows BPLOG_IF to be overriden by defines in BP_LOGGING_INCLUDE.

Change-Id: Ic6e8373476cc4d1f73d55e13a23686a2c8309fdc
Reviewed-on: https://chromium-review.googlesource.com/c/1278104
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
Joshua Peraza 2018-10-12 09:19:13 -07:00
parent 315d1368a7
commit 66571f4838

View file

@ -190,7 +190,9 @@ int ErrnoString(string *error_string);
__FILE__, __LINE__)
#endif // BPLOG_CRITICAL
#ifndef BPLOG_IF
#define BPLOG_IF(severity, condition) \
BPLOG_LAZY_STREAM(severity, ((condition) && BPLOG_LOG_IS_ON(severity)))
#endif // BPLOG_IF
#endif // PROCESSOR_LOGGING_H__