60#define BJ_MAXIMUM_LOG_LEN 120u
95#ifdef BJ_BUILD_RELEASE
96# define bj_log_msg(LEVEL, ...) bj_log_message(BJ_LOG_ ## LEVEL, 0, 0, __VA_ARGS__)
98# define bj_log_msg(LEVEL, ...) bj_log_message(BJ_LOG_ ## LEVEL, __FILE__, __LINE__, __VA_ARGS__)
113#define bj_trace(...) bj_log_msg(TRACE, __VA_ARGS__)
127#define bj_debug(...) bj_log_msg(DEBUG, __VA_ARGS__)
141#define bj_info(...) bj_log_msg(INFO, __VA_ARGS__)
155#define bj_warn(...) bj_log_msg(WARN, __VA_ARGS__)
169#define bj_err(...) bj_log_msg(ERROR, __VA_ARGS__)
183#define bj_fatal(...) bj_log_msg(FATAL, __VA_ARGS__)
General-purpose definitions for Banjo API.
int bj_get_log_level(void)
Gets the current log level set by bj_set_log_level.
const char * bj_get_log_level_string(int level)
Returns a string describing the given level.
size_t bj_log_message(int level, const char *file, int line, const char *format,...)
Generic message reporting function.
void bj_set_log_level(int level)
Sets the default log level.
@ BJ_LOG_INFO
Informational messages about execution.
@ BJ_LOG_TRACE
Fine-grained diagnostic details.
@ BJ_LOG_WARN
Warnings for potential issues.
@ BJ_LOG_FATAL
Critical errors leading to termination.
@ BJ_LOG_ERROR
Errors preventing correct function.
@ BJ_LOG_DEBUG
Detailed information for debugging.