Example #1
0
File: log.c Project: 7u83/actube
void cw_log(int prio, const char *format, ...)
{
	va_list args;
	char fbuf[1024];
	int i;

	for (i=0; cw_log_writers[i]; i++){
	
		if (cw_log_writers[i]->colored){
			sprintf(fbuf, "%s%s%s: %s%s",
				cw_strlist_get_str(prefix_color,prio),
				cw_strlist_get_str(prefix,prio),
				cw_strlist_get_str(text_color,prio),
				format,
				cw_strlist_get_str(end_color,prio)
			);
			
		}
		else{
			sprintf(fbuf, "%s: %s",
				cw_strlist_get_str(prefix,prio),
				format
			);
			
		}
		va_start(args, format);		
		cw_log_writers[i]->write(prio,fbuf,args,cw_log_writers[i]);
		va_end(args);
	}

}
Example #2
0
File: dbg.c Project: yskcg/actube
static const char * get_dbg_color_ontext(int level){
	if ( ! (cw_dbg_opt_display & DBG_DISP_COLORS ) )
		return "";
	return cw_strlist_get_str(color_ontext,level);

}
Example #3
0
File: dbg.c Project: yskcg/actube
static const char * get_dbg_prefix(int level){
	return cw_strlist_get_str(prefix,level);

}