+#define BT_COMP_OR_COMP_CLASS_LOG(_lvl, _self_comp, _self_comp_class, _fmt, ...) \
+ do { \
+ /* Only one of `_self_comp` and `_self_comp_class` must be set. */ \
+ BT_ASSERT((!!(_self_comp) != (!!_self_comp_class))); \
+ if (_self_comp) { \
+ BT_COMP_LOG(_lvl, _self_comp, _fmt, ##__VA_ARGS__); \
+ } else { \
+ BT_COMP_CLASS_LOG(_lvl, _self_comp_class, _fmt, ##__VA_ARGS__); \
+ } \
+ } while (0)
+