Пример #1
0
APT_DECLARE(apt_bool_t) apt_va_log(const char *file, int line, apt_log_priority_e priority, const char *format, va_list arg_ptr)
{
	apt_bool_t status = TRUE;
	if(!apt_logger) {
		return FALSE;
	}
	if(priority <= apt_logger->priority) {
		if(apt_logger->ext_handler) {
			status = apt_logger->ext_handler(file,line,NULL,priority,format,arg_ptr);
		}
		else {
			status = apt_do_log(file,line,priority,format,arg_ptr);
		}
	}
	return status;
}
Пример #2
0
APT_DECLARE(apt_bool_t) apt_log(apt_log_priority_e priority, const char *format, ...)
{
	apt_bool_t status = TRUE;
	if(priority <= apt_logger.priority) {
		va_list arg_ptr;
		va_start(arg_ptr, format);
		if(apt_logger.handler) {
			status = apt_logger.handler(priority,format,arg_ptr);
		}
		else {
			status = apt_do_log(priority,format,arg_ptr);
		}
		va_end(arg_ptr); 
	}
	return status;
}
Пример #3
0
APT_DECLARE(apt_bool_t) apt_obj_log(const char *file, int line, apt_log_priority_e priority, void *obj, const char *format, ...)
{
	apt_bool_t status = TRUE;
	if(!apt_logger) {
		return FALSE;
	}
	if(priority <= apt_logger->priority) {
		va_list arg_ptr;
		va_start(arg_ptr, format);
		if(apt_logger->ext_handler) {
			status = apt_logger->ext_handler(file,line,obj,priority,format,arg_ptr);
		}
		else {
			status = apt_do_log(file,line,priority,format,arg_ptr);
		}
		va_end(arg_ptr); 
	}
	return status;
}