25#define BJ_MAXIMUM_LOG_LEN 120
57#ifdef BJ_BUILD_RELEASE
58# define bj_log(LEVEL, ...) bj_message(BJ_LOG_ ## LEVEL, 0, 0, __VA_ARGS__)
60# define bj_log(LEVEL, ...) bj_message(BJ_LOG_ ## LEVEL, __FILE__, __LINE__, __VA_ARGS__)
75#define bj_trace(...) bj_log(TRACE, __VA_ARGS__)
89#define bj_debug(...) bj_log(DEBUG, __VA_ARGS__)
103#define bj_info(...) bj_log(INFO, __VA_ARGS__)
117#define bj_warn(...) bj_log(WARN, __VA_ARGS__)
131#define bj_err(...) bj_log(ERROR, __VA_ARGS__)
145#define bj_fatal(...) bj_log(FATAL, __VA_ARGS__)
231BANJO_EXPORT
size_t bj_message(
int level,
const char* p_file,
int line,
const char* p_format, ...);
General-purpose definitions for Banjo API.
void bj_log_set_level(int level)
Sets the default log level.
const char * bj_log_get_level_string(int level)
Returns a string describing the given level.
int bj_log_get_level(void)
Gets the current log level set by bj_log_set_level.
size_t bj_message(int level, const char *p_file, int line, const char *p_format,...)
Generic message reporting function.
@ BJ_LOG_INFO
Informational messages about execution.
Definition log.h:34
@ BJ_LOG_TRACE
Fine-grained diagnostic details.
Definition log.h:32
@ BJ_LOG_WARN
Warnings for potential issues.
Definition log.h:35
@ BJ_LOG_FATAL
Critical errors leading to termination.
Definition log.h:37
@ BJ_LOG_ERROR
Errors preventing correct function.
Definition log.h:36
@ BJ_LOG_DEBUG
Detailed information for debugging.
Definition log.h:33