From ce64caa6b8ed0f4713c66f50e4368d645233d93a Mon Sep 17 00:00:00 2001 From: WeijieSun Date: Thu, 1 Feb 2018 18:38:52 +0800 Subject: [PATCH] remove __TITLE__ macro from logging Summary: Ref T10562 Test Plan: N/A Reviewers: qinzuoyan, cailiuyang Reviewed By: qinzuoyan Subscribers: #pegasus Maniphest Tasks: T10562 Differential Revision: https://phabricator.d.xiaomi.net/D84832 --- rdsn | 2 +- src/client_lib/pegasus_client_factory_impl.cpp | 5 ----- src/client_lib/pegasus_client_impl.cpp | 5 ----- src/client_lib/pegasus_scanner_impl.cpp | 5 ----- src/redis_protocol/proxy_lib/proxy_layer.cpp | 5 ----- src/redis_protocol/proxy_lib/redis_parser.cpp | 5 ----- src/redis_protocol/proxy_ut/redis_proxy_test.cpp | 6 ------ src/server/available_detector.cpp | 5 ----- src/server/info_collector.cpp | 5 ----- src/server/info_collector_app.cpp | 5 ----- src/server/main.cpp | 5 ----- src/server/pegasus_counter_updater.cpp | 7 +------ src/server/pegasus_perf_counter.cpp | 5 ----- src/server/pegasus_server_impl.cpp | 5 ----- src/shell/config.ini | 2 +- src/test/function_test/main.cpp | 5 ----- src/test/function_test/test_basic.cpp | 5 ----- src/test/function_test/test_recall.cpp | 5 ----- src/test/function_test/test_recovery.cpp | 5 ----- src/test/function_test/test_restore.cpp | 5 ----- src/test/function_test/test_scan.cpp | 5 ----- src/test/function_test/test_slog_lost.cpp | 5 ----- src/test/kill_test/data_verifier.cpp | 5 ----- src/test/kill_test/job.cpp | 5 ----- src/test/kill_test/kill_testor.cpp | 5 ----- src/test/kill_test/killer_handler_shell.cpp | 5 ----- src/test/kill_test/process_killer.cpp | 5 ----- src/test/pressure_test/main.cpp | 5 ----- 28 files changed, 3 insertions(+), 134 deletions(-) diff --git a/rdsn b/rdsn index be1bdfe..c1e43b4 160000 --- a/rdsn +++ b/rdsn @@ -1 +1 @@ -Subproject commit be1bdfe95fc96484b0bcdae31ce621c0d122ec7d +Subproject commit c1e43b4e040847c8fbbbb83a4409265ab026d41d diff --git a/src/client_lib/pegasus_client_factory_impl.cpp b/src/client_lib/pegasus_client_factory_impl.cpp index 89818a3..4401ae7 100644 --- a/src/client_lib/pegasus_client_factory_impl.cpp +++ b/src/client_lib/pegasus_client_factory_impl.cpp @@ -4,11 +4,6 @@ #include "pegasus_client_factory_impl.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.client.factory.impl" - namespace pegasus { namespace client { diff --git a/src/client_lib/pegasus_client_impl.cpp b/src/client_lib/pegasus_client_impl.cpp index b025888..880fa23 100644 --- a/src/client_lib/pegasus_client_impl.cpp +++ b/src/client_lib/pegasus_client_impl.cpp @@ -15,11 +15,6 @@ #include #include "pegasus_client_impl.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.client.impl" - using namespace ::dsn; namespace pegasus { diff --git a/src/client_lib/pegasus_scanner_impl.cpp b/src/client_lib/pegasus_scanner_impl.cpp index 72296a2..b80ae22 100644 --- a/src/client_lib/pegasus_scanner_impl.cpp +++ b/src/client_lib/pegasus_scanner_impl.cpp @@ -5,11 +5,6 @@ #include "pegasus_client_impl.h" #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.scanner.impl" - using namespace ::dsn; using namespace pegasus; diff --git a/src/redis_protocol/proxy_lib/proxy_layer.cpp b/src/redis_protocol/proxy_lib/proxy_layer.cpp index ef796da..f615290 100644 --- a/src/redis_protocol/proxy_lib/proxy_layer.cpp +++ b/src/redis_protocol/proxy_lib/proxy_layer.cpp @@ -4,11 +4,6 @@ #include "proxy_layer.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.rproxy.layer" - namespace pegasus { namespace proxy { diff --git a/src/redis_protocol/proxy_lib/redis_parser.cpp b/src/redis_protocol/proxy_lib/redis_parser.cpp index 0faf49b..8c45c1a 100644 --- a/src/redis_protocol/proxy_lib/redis_parser.cpp +++ b/src/redis_protocol/proxy_lib/redis_parser.cpp @@ -10,11 +10,6 @@ #include #include "redis_parser.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.rproxy.parser" - #define CR '\015' #define LF '\012' diff --git a/src/redis_protocol/proxy_ut/redis_proxy_test.cpp b/src/redis_protocol/proxy_ut/redis_proxy_test.cpp index abfc043..32a4dd1 100644 --- a/src/redis_protocol/proxy_ut/redis_proxy_test.cpp +++ b/src/redis_protocol/proxy_ut/redis_proxy_test.cpp @@ -13,12 +13,6 @@ #include "proxy_layer.h" #include "redis_parser.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif - -#define __TITLE__ "pegasus.rproxy.test" - using namespace boost::asio; using namespace ::pegasus::proxy; diff --git a/src/server/available_detector.cpp b/src/server/available_detector.cpp index 46e8695..9e26ae8 100644 --- a/src/server/available_detector.cpp +++ b/src/server/available_detector.cpp @@ -9,11 +9,6 @@ #include #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "available.detector" - namespace pegasus { namespace server { diff --git a/src/server/info_collector.cpp b/src/server/info_collector.cpp index 9dde9ab..58f4b11 100644 --- a/src/server/info_collector.cpp +++ b/src/server/info_collector.cpp @@ -11,11 +11,6 @@ #include #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "info.collector" - #define METRICSNUM 3 using namespace ::dsn; diff --git a/src/server/info_collector_app.cpp b/src/server/info_collector_app.cpp index 8bca99e..3f273a8 100644 --- a/src/server/info_collector_app.cpp +++ b/src/server/info_collector_app.cpp @@ -12,11 +12,6 @@ #include #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "info.collector.app" - namespace pegasus { namespace server { diff --git a/src/server/main.cpp b/src/server/main.cpp index ac59b0d..743adde 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -22,11 +22,6 @@ #include #endif -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.server.main" - #define STR_I(var) #var #define STR(var) STR_I(var) #ifndef DSN_BUILD_TYPE diff --git a/src/server/pegasus_counter_updater.cpp b/src/server/pegasus_counter_updater.cpp index c781f68..8265b26 100644 --- a/src/server/pegasus_counter_updater.cpp +++ b/src/server/pegasus_counter_updater.cpp @@ -18,11 +18,6 @@ #include #endif -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.counter.updater" - using namespace ::dsn; namespace pegasus { @@ -62,7 +57,7 @@ static void libevent_log(int severity, const char *msg) level = LOG_LEVEL_WARNING; else level = LOG_LEVEL_ERROR; - dlog(level, __TITLE__, msg); + dlog(level, msg); } #if defined(__linux__) diff --git a/src/server/pegasus_perf_counter.cpp b/src/server/pegasus_perf_counter.cpp index cb1bad9..d9a6f39 100644 --- a/src/server/pegasus_perf_counter.cpp +++ b/src/server/pegasus_perf_counter.cpp @@ -7,11 +7,6 @@ #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.perf.counter" - using namespace ::dsn; using namespace ::dsn::tools; diff --git a/src/server/pegasus_server_impl.cpp b/src/server/pegasus_server_impl.cpp index 1da2462..4397fc7 100644 --- a/src/server/pegasus_server_impl.cpp +++ b/src/server/pegasus_server_impl.cpp @@ -13,11 +13,6 @@ #include #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.server.impl" - namespace pegasus { namespace server { diff --git a/src/shell/config.ini b/src/shell/config.ini index 254d789..3786868 100644 --- a/src/shell/config.ini +++ b/src/shell/config.ini @@ -36,7 +36,7 @@ enable_default_app_mimic = true data_dir = ./pegasus_shell.data [tools.simple_logger] -short_header = true +short_header = false fast_flush = true max_number_of_log_files_on_disk = 10 stderr_start_level = LOG_LEVEL_FATAL diff --git a/src/test/function_test/main.cpp b/src/test/function_test/main.cpp index ce1d173..e6bf959 100644 --- a/src/test/function_test/main.cpp +++ b/src/test/function_test/main.cpp @@ -12,11 +12,6 @@ #include #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "function.test.main" - using namespace ::pegasus; pegasus_client *client = nullptr; diff --git a/src/test/function_test/test_basic.cpp b/src/test/function_test/test_basic.cpp index 0891357..dca6b11 100644 --- a/src/test/function_test/test_basic.cpp +++ b/src/test/function_test/test_basic.cpp @@ -14,11 +14,6 @@ #include #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "function.test.basic" - using namespace ::pegasus; extern pegasus_client *client; diff --git a/src/test/function_test/test_recall.cpp b/src/test/function_test/test_recall.cpp index 42c0587..e6f699e 100644 --- a/src/test/function_test/test_recall.cpp +++ b/src/test/function_test/test_recall.cpp @@ -18,11 +18,6 @@ #include "utils.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "function.test.recall" - using namespace dsn::replication; TEST(drop_and_recall, simple) diff --git a/src/test/function_test/test_recovery.cpp b/src/test/function_test/test_recovery.cpp index d5e2fba..555cdda 100644 --- a/src/test/function_test/test_recovery.cpp +++ b/src/test/function_test/test_recovery.cpp @@ -18,11 +18,6 @@ #include "global_env.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "function.test.recovery" - using namespace dsn::replication; class recovery_test : public testing::Test diff --git a/src/test/function_test/test_restore.cpp b/src/test/function_test/test_restore.cpp index b5c563e..1dfcd54 100644 --- a/src/test/function_test/test_restore.cpp +++ b/src/test/function_test/test_restore.cpp @@ -8,11 +8,6 @@ #include "global_env.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "function.test.restore" - using namespace ::dsn; using namespace ::dsn::replication; using namespace pegasus; diff --git a/src/test/function_test/test_scan.cpp b/src/test/function_test/test_scan.cpp index 6e09eb3..30c60e6 100644 --- a/src/test/function_test/test_scan.cpp +++ b/src/test/function_test/test_scan.cpp @@ -12,11 +12,6 @@ #include #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "function.test.scan" - using namespace ::pegasus; extern pegasus_client *client; diff --git a/src/test/function_test/test_slog_lost.cpp b/src/test/function_test/test_slog_lost.cpp index 03e07e7..886ad6b 100644 --- a/src/test/function_test/test_slog_lost.cpp +++ b/src/test/function_test/test_slog_lost.cpp @@ -18,11 +18,6 @@ #include "global_env.h" #include "utils.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "function.test.recall" - using namespace dsn::replication; static const std::string table_for_lost_log = "table_for_lost_log"; diff --git a/src/test/kill_test/data_verifier.cpp b/src/test/kill_test/data_verifier.cpp index 7f038bf..e2acbb4 100644 --- a/src/test/kill_test/data_verifier.cpp +++ b/src/test/kill_test/data_verifier.cpp @@ -45,11 +45,6 @@ static const long stat_p999_pos = stat_batch - stat_batch / 1000 - 1; static const long stat_p9999_pos = stat_batch - stat_batch / 10000 - 1; static const long stat_max_pos = stat_batch - 1; -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.verifier" - // return time in us. long get_time() { diff --git a/src/test/kill_test/job.cpp b/src/test/kill_test/job.cpp index 542187a..893ceba 100644 --- a/src/test/kill_test/job.cpp +++ b/src/test/kill_test/job.cpp @@ -4,11 +4,6 @@ #include "job.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "killtest.job" - namespace pegasus { namespace test { diff --git a/src/test/kill_test/kill_testor.cpp b/src/test/kill_test/kill_testor.cpp index c58ec97..ea69d11 100644 --- a/src/test/kill_test/kill_testor.cpp +++ b/src/test/kill_test/kill_testor.cpp @@ -8,11 +8,6 @@ #include "kill_testor.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "kill.testor" - namespace pegasus { namespace test { diff --git a/src/test/kill_test/killer_handler_shell.cpp b/src/test/kill_test/killer_handler_shell.cpp index f56a958..5a025e8 100644 --- a/src/test/kill_test/killer_handler_shell.cpp +++ b/src/test/kill_test/killer_handler_shell.cpp @@ -10,11 +10,6 @@ #include #include -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "killer.handler.shell" - namespace pegasus { namespace test { diff --git a/src/test/kill_test/process_killer.cpp b/src/test/kill_test/process_killer.cpp index a045b16..0812505 100644 --- a/src/test/kill_test/process_killer.cpp +++ b/src/test/kill_test/process_killer.cpp @@ -21,11 +21,6 @@ #include "kill_testor.h" #include "process_killer.h" -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.killer" - using namespace std; using namespace ::pegasus; using namespace ::pegasus::test; diff --git a/src/test/pressure_test/main.cpp b/src/test/pressure_test/main.cpp index 42fa37e..def3b17 100644 --- a/src/test/pressure_test/main.cpp +++ b/src/test/pressure_test/main.cpp @@ -18,11 +18,6 @@ using namespace std; using namespace ::pegasus; -#ifdef __TITLE__ -#undef __TITLE__ -#endif -#define __TITLE__ "pegasus.pressure.test" - DEFINE_TASK_CODE(LPC_DEFAUT_TASK, TASK_PRIORITY_COMMON, dsn::THREAD_POOL_DEFAULT) //[min, max], min and max is unsigned -- GitLab