Function ecs_log_set_level


#include <include/flecs/addons/log.h>

FLECS_API int ecs_log_set_level(int level)


Enable or disable tracing. This will enable builtin tracing. For tracing to work, it will have to be compiled in which requires defining one of the following macros:

FLECS_LOG_0 - All tracing is disabled FLECS_LOG_1 - Enable tracing level 1 FLECS_LOG_2 - Enable tracing level 2 and below FLECS_LOG_3 - Enable tracing level 3 and below

If no tracing level is defined and this is a debug build, FLECS_LOG_3 will have been automatically defined.

The provided level corresponds with the tracing level. If -1 is provided as value, warnings are disabled. If -2 is provided, errors are disabled as well.


level - Desired tracing level.

Previous tracing level.


Line 435 in include/flecs/addons/log.h.