コード例 #1
0
void acl_msg_panic(const char *fmt,...)
{
	va_list ap;

	va_start (ap, fmt);

	if (__pre_write_fn)
		__pre_write_fn(__pre_write_ctx, fmt, ap);

	if (__log_open_flag) {
		if (__write_fn != NULL)
			__write_fn(__msg_ctx, fmt, ap);
		else
			acl_write_to_log2("panic", fmt, ap);
	} else if (__stdout_enable) {
#ifdef LINUX
		printf("acl_msg_panic->pid(%d), ", getpid());
#elif defined(SOLARIS)
		printf("acl_msg_panic->pid(%ld), ", getpid());
#endif
		vprintf(fmt, ap);
		printf("\r\n");
	}

	va_end (ap);

	acl_log_strace();
	acl_close_log();
	acl_assert(0);
}
コード例 #2
0
ファイル: acl_msg.c プロジェクト: shitfSign/acl
void acl_msg_fatal_status(int status, const char *fmt,...)
{
	va_list ap;

	status = status;
	va_start (ap, fmt);

	if (__log_open_flag) {
		if (__write_fn != NULL)
			__write_fn(__msg_ctx, fmt, ap);
		else
			acl_write_to_log2("fatal", fmt, ap);
	} else if (__stdout_enable) {
#ifdef LINUX
		printf("acl_msg_fatal_status->pid(%d), ", getpid());
#elif defined(SOLARIS)
		printf("acl_msg_fatal_status->pid(%ld), ", getpid());
#endif
		vprintf(fmt, ap);
		printf("\r\n");
	}

	va_end (ap);
	acl_close_log();
	acl_assert(0);
}
コード例 #3
0
void acl_msg_close(void)
{
	if (__log_open_flag == 0)
		return;
	acl_close_log();
	__log_open_flag = 0;
	if (__close_fn)
		__close_fn(__msg_ctx);
}
コード例 #4
0
ファイル: acl_msg.c プロジェクト: shitfSign/acl
void acl_msg_fatal2(const char *fmt, va_list ap)
{
	if (__pre_write_fn)
		__pre_write_fn(__pre_write_ctx, fmt, ap);

	if (__log_open_flag) {
		if (__write_fn != NULL)
			__write_fn(__msg_ctx, fmt, ap);
		else
			acl_write_to_log2("fatal", fmt, ap);
	} else if (__stdout_enable) {
#ifdef LINUX
		printf("acl_msg_fatal->pid(%d), ", getpid());
#elif defined(SOLARIS)
		printf("acl_msg_fatal->pid(%ld), ", getpid());
#endif
		vprintf(fmt, ap);
		printf("\r\n");
	}
	acl_close_log();
	acl_assert(0);
}