mirror of
https://github.com/wassname/ray.git
synced 2026-07-10 09:24:33 +08:00
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:
committed by
Robert Nishihara
parent
f16d33593b
commit
2c9a4f6b41
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user