mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-29 18:37:41 +08:00
Optimize and test fiber log
This commit is contained in:
parent
eb84d01ea2
commit
808709245c
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
|
|
||||||
static char *version = "3.6.1-6 20241018-14:42";
|
static char *version = "3.6.1-6 20241024-11:47";
|
||||||
|
|
||||||
const char *acl_version(void)
|
const char *acl_version(void)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ static int acl_var_fiber_hook_log;
|
|||||||
static ACL_CONFIG_BOOL_TABLE __conf_bool_tab[] = {
|
static ACL_CONFIG_BOOL_TABLE __conf_bool_tab[] = {
|
||||||
{ "fiber_quick_abort", 1, &acl_var_fiber_quick_abort },
|
{ "fiber_quick_abort", 1, &acl_var_fiber_quick_abort },
|
||||||
{ "fiber_share_stack", 0, &acl_var_fiber_share_stack },
|
{ "fiber_share_stack", 0, &acl_var_fiber_share_stack },
|
||||||
{ "fiber_hook_log", 1, &acl_var_fiber_hook_log },
|
{ "fiber_hook_log", 0, &acl_var_fiber_hook_log },
|
||||||
|
|
||||||
{ 0, 0, 0 },
|
{ 0, 0, 0 },
|
||||||
};
|
};
|
||||||
@ -1071,8 +1071,8 @@ static void fiber_log_writer(void *, const char *fmt, va_list ap)
|
|||||||
|
|
||||||
acl::string buf;
|
acl::string buf;
|
||||||
buf.vformat(fmt, tmp);
|
buf.vformat(fmt, tmp);
|
||||||
//acl_msg_info("%s", buf.c_str());
|
acl_msg_info("%s", buf.c_str());
|
||||||
printf("%s\r\n", buf.c_str());
|
//printf("%s\r\n", buf.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hook_fiber_log(void)
|
static void hook_fiber_log(void)
|
||||||
@ -1314,7 +1314,10 @@ void acl_fiber_server_main(int argc, char *argv[],
|
|||||||
acl_msg_info("schedule event type - %s", acl_var_fiber_schedule_event);
|
acl_msg_info("schedule event type - %s", acl_var_fiber_schedule_event);
|
||||||
|
|
||||||
if (acl_var_fiber_hook_log) {
|
if (acl_var_fiber_hook_log) {
|
||||||
hook_fiber_log();
|
// No support io_uring mode current!.
|
||||||
|
if (__fiber_schedule_event != FIBER_EVENT_IO_URING) {
|
||||||
|
hook_fiber_log();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(_WIN32) && !defined(_WIN64)
|
#if !defined(_WIN32) && !defined(_WIN64)
|
||||||
|
Loading…
Reference in New Issue
Block a user