diff --git a/src/ubsocket/brpc/brpc_context.h b/src/ubsocket/brpc/brpc_context.h index 3e53a1b818312e9e4c62c8340931e291f74f9ca1..7defac7195f38025d5c0e4f7c6575e3e5757f6ff 100644 --- a/src/ubsocket/brpc/brpc_context.h +++ b/src/ubsocket/brpc/brpc_context.h @@ -181,12 +181,6 @@ class Context : public Brpc::ConfigSettings { return; } - if (GetLogUse()) { - if (RpcAdptSetLogCtx() != UMQ_SUCCESS) { - RPC_ADPT_VLOG_WARN("Log output via printf is disabled; messages will be sent to syslog.\n"); - } - } - SetSocketFdTransMode(SOCKET_FD_TRANS_MODE_UMQ); if (m_stats_enable) { diff --git a/src/ubsocket/brpc/brpc_file_descriptor.h b/src/ubsocket/brpc/brpc_file_descriptor.h index fe7c0b8ad85d15484a04fa66f787e0aa16230834..0083b1ecbea3a42f7f00e9c5db45e2aab884a310 100644 --- a/src/ubsocket/brpc/brpc_file_descriptor.h +++ b/src/ubsocket/brpc/brpc_file_descriptor.h @@ -940,6 +940,7 @@ private: } if(!context->IsBonding()){ queue_cfg.dev_info.assign_mode = UMQ_DEV_ASSIGN_MODE_DEV; + queue_cfg.dev_info.dev.eid_idx = GetEidIdx(); } else { // init use bonding dev queue_cfg.dev_info.assign_mode = UMQ_DEV_ASSIGN_MODE_EID; diff --git a/src/ubsocket/configure_settings.h b/src/ubsocket/configure_settings.h index aa82342998e30e9992352f91edcf22a12f2b6779..afee25604159aa83e02d47a0d04010ea902fe448 100644 --- a/src/ubsocket/configure_settings.h +++ b/src/ubsocket/configure_settings.h @@ -224,6 +224,16 @@ protected: virtual void LoadEnvVars() { char *env_ptr; + if ((env_ptr = getenv(ENV_LOG_USE_PRINTF)) != NULL) { + uint32_t use_printf = static_cast(atoi(env_ptr)); + m_log_use_printf = use_printf != 0; + if(m_log_use_printf){ + if (RpcAdptSetLogCtx() != UMQ_SUCCESS) { + RPC_ADPT_VLOG_WARN("Log output via printf is disabled; messages will be sent to syslog.\n"); + } + } + } + if((env_ptr = getenv(ENV_VAR_LOG_LEVEL)) != NULL){ ReadEnvVar(env_ptr,m_log_level_str,sizeof(m_log_level_str)); } @@ -284,11 +294,6 @@ protected: m_block_type = BLOCK_SIZE_8K; } } - - if ((env_ptr = getenv(ENV_LOG_USE_PRINTF)) != NULL) { - uint32_t use_printf = static_cast(atoi(env_ptr)); - m_log_use_printf = use_printf != 0; - } } void SetSocketFdTransMode(socket_fd_trans_mode trans_mode)