96 #ifndef MAX_LOGMSG_CATEGORIES 98 #define MAX_LOGMSG_CATEGORIES 16 104 #define DBGMSG_LEVEL_MARK {"NON", "FTL", "ERR", "WRN", "INF", "IFV", "DBG", "DBV"} 110 #define UBL_TS_BIT_FIELDS 3 // bit0 and bit1 116 #define UBL_OVERRIDE_ISTR(x,y) ub_log_initstr_override(x,UBB_GETENV(y)) 118 #ifdef PRINT_FORMAT_NO_WARNING 120 #define PRINT_FORMAT_ATTRIBUTE1 121 #define PRINT_FORMAT_ATTRIBUTE4 124 #define PRINT_FORMAT_ATTRIBUTE1 __attribute__((format (printf, 1, 2))) 125 #define PRINT_FORMAT_ATTRIBUTE4 __attribute__((format (printf, 4, 5))) int ub_log_add_category(const char *catstr)
add a category of logging at the bottom of the index
void ub_log_flush(void)
flush out messages on the both of cosole log and debug log
Definition: ub_logging.h:87
void ub_console_debug_select_print(bool console, bool debug, const char *astr)
output to console out and debug out by selection
int ub_log_return(int cat_index)
return console log level and console log level to the previous status
Definition: ub_logging.h:92
uint32_t flags
Definition: csl_udmap_tr.h:213
bool ub_clog_on(int cat_index, ub_dbgmsg_level_t level)
check if console log is enabled or not for the indicated cat_index and level
Definition: ub_logging.h:88
Definition: ub_logging.h:89
Definition: ub_logging.h:85
bool ub_dlog_on(int cat_index, ub_dbgmsg_level_t level)
check if debug log is enabled or not for the indicated cat_index and level
int ub_log_print(int cat_index, int flags, ub_dbgmsg_level_t level, const char *astr)
print log message
Definition: ub_logging.h:91
ub_dbgmsg_level_t
This defines different logging levels.
Definition: ub_logging.h:84
const char * ub_log_initstr_override(const char *ns, const char *os)
override 'istr' of ub_log_inig
Definition: ub_logging.h:90
void ub_log_init(const char *istr)
initialize logging by a string
Definition: ub_logging.h:86
int ub_log_change(int cat_index, ub_dbgmsg_level_t clevel, ub_dbgmsg_level_t dlevel)
change console log level to clevel, and debug log level to delevl