Evaluate debug logging only in debug mode (#2869)

This PR makes it so debugging logs are only evaluated during debugging. We found that for the current code, functions called in debug logging code are evaluated even in release mode (even though nothing is printed).
This commit is contained in:
Philipp Moritz
2018-09-14 11:40:44 -07:00
committed by Robert Nishihara
parent f16d33593b
commit 2c9a4f6b41
+3 -1
View File
@@ -35,7 +35,9 @@ namespace ray {
#define RAY_LOG_INTERNAL(level) ::ray::RayLog(__FILE__, __LINE__, level)
#define RAY_LOG(level) RAY_LOG_INTERNAL(RAY_##level)
#define RAY_LOG(level) \
if (ray::RayLog::IsLevelEnabled(RAY_##level)) RAY_LOG_INTERNAL(RAY_##level)
#define RAY_IGNORE_EXPR(expr) ((void)(expr))
#define RAY_CHECK(condition) \