diff --git a/examples/features/https/client/client.cc b/examples/features/https/client/client.cc index f77d8577..fb309d2b 100644 --- a/examples/features/https/client/client.cc +++ b/examples/features/https/client/client.cc @@ -197,7 +197,6 @@ int main(int argc, char* argv[]) { exit(-1); } - ::trpc::log::Init(); // If the business code is running in trpc pure client mode, // the business code needs to be running in the `RunInTrpcRuntime` function return ::trpc::RunInTrpcRuntime([]() { return http::demo::Run(); }); diff --git a/trpc/util/log/logging.h b/trpc/util/log/logging.h index 0204a337..5d5e585c 100644 --- a/trpc/util/log/logging.h +++ b/trpc/util/log/logging.h @@ -196,11 +196,16 @@ constexpr char kTrpcLogCacheStringDefault[] = "default"; TRPC_PRT_IF_EX(context, instance, condition, ::trpc::Log::critical, format, ##args) /// @brief Log will be output to the "default" logger instance provided by the framework "default" plugin. -#define TRPC_PRT_TRACE(format, args...) TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::trace, format, ##args) -#define TRPC_PRT_DEBUG(format, args...) TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::debug, format, ##args) -#define TRPC_PRT_INFO(format, args...) TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::info, format, ##args) -#define TRPC_PRT_WARN(format, args...) TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::warn, format, ##args) -#define TRPC_PRT_ERROR(format, args...) TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::error, format, ##args) +#define TRPC_PRT_TRACE(format, args...) \ + TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::trace, format, ##args) +#define TRPC_PRT_DEBUG(format, args...) \ + TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::debug, format, ##args) +#define TRPC_PRT_INFO(format, args...) \ + TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::info, format, ##args) +#define TRPC_PRT_WARN(format, args...) \ + TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::warn, format, ##args) +#define TRPC_PRT_ERROR(format, args...) \ + TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::error, format, ##args) #define TRPC_PRT_CRITICAL(format, args...) \ TRPC_PRT_DEFAULT(::trpc::log::kTrpcLogCacheStringDefault, ::trpc::Log::critical, format, ##args) @@ -247,7 +252,8 @@ constexpr char kTrpcLogCacheStringDefault[] = "default"; #define TRPC_LOGGER_INFO_IF(instance, condition, msg) TRPC_LOG_MSG_IF(::trpc::Log::info, instance, condition, msg) #define TRPC_LOGGER_WARN_IF(instance, condition, msg) TRPC_LOG_MSG_IF(::trpc::Log::warn, instance, condition, msg) #define TRPC_LOGGER_ERROR_IF(instance, condition, msg) TRPC_LOG_MSG_IF(::trpc::Log::error, instance, condition, msg) -#define TRPC_LOGGER_CRITICAL_IF(instance, condition, msg) TRPC_LOG_MSG_IF(::trpc::Log::critical, instance, condition, msg) +#define TRPC_LOGGER_CRITICAL_IF(instance, condition, msg) \ + TRPC_LOG_MSG_IF(::trpc::Log::critical, instance, condition, msg) /// @brief logger instances can be specified to customize the log output. /// @note Use case: Separate business logs from framework logs, diff --git a/trpc/util/object_pool/object_pool.h b/trpc/util/object_pool/object_pool.h index b0b3875d..c3c87f95 100644 --- a/trpc/util/object_pool/object_pool.h +++ b/trpc/util/object_pool/object_pool.h @@ -37,7 +37,8 @@ enum class ObjectPoolType { kGlobal }; -/// @brief The internal encapsulated implementation of object_pool. Do not use the interfaces of this namespace directly. +/// @brief The internal encapsulated implementation of object_pool. Do not use the interfaces of this namespace +/// directly. /// @private For internal use purpose only. namespace detail {