forked from bartvdbraak/blender
C Logging: add macro to check if logging is enabled
This commit is contained in:
parent
d4d16e7a03
commit
167f5a61e5
@ -158,6 +158,10 @@ void CLG_logref_init(CLG_LogRef *clg_ref);
|
||||
#define CLOG_ENSURE(clg_ref) \
|
||||
((clg_ref)->type ? (clg_ref)->type : (CLG_logref_init(clg_ref), (clg_ref)->type))
|
||||
|
||||
#define CLOG_CHECK(clg_ref, verbose_level, ...) \
|
||||
((void)CLOG_ENSURE(clg_ref), \
|
||||
((clg_ref)->type->flag & CLG_FLAG_USE) && ((clg_ref)->type->level >= verbose_level))
|
||||
|
||||
#define CLOG_AT_SEVERITY(clg_ref, severity, verbose_level, ...) \
|
||||
{ \
|
||||
CLG_LogType *_lg_ty = CLOG_ENSURE(clg_ref); \
|
||||
|
Loading…
Reference in New Issue
Block a user