Skip to content

Commit 527cf71

Browse files
RahulHereRahulHere
authored andcommitted
Change ApplicationBase logs from INFO to DEBUG
Internal initialization messages should not be shown to end users by default. Changed GOPHER_LOG_INFO to GOPHER_LOG_DEBUG for application lifecycle logs (startup, workers, shutdown).
1 parent d47a81e commit 527cf71

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

include/mcp/mcp_application_base.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ class ApplicationBase {
910910

911911
ApplicationBase(const Config& config)
912912
: config_(config), shutdown_requested_(false), workers_started_(false) {
913-
GOPHER_LOG_INFO("Initializing application: {}", config_.name);
913+
GOPHER_LOG_DEBUG("Initializing application: {}", config_.name);
914914
}
915915

916916
virtual ~ApplicationBase() { shutdown(); }
@@ -930,11 +930,11 @@ class ApplicationBase {
930930
main_dispatcher_owned_ =
931931
std::make_unique<event::LibeventDispatcher>("main");
932932
main_dispatcher_ = main_dispatcher_owned_.get();
933-
GOPHER_LOG_INFO("Created main dispatcher");
933+
GOPHER_LOG_DEBUG("Created main dispatcher");
934934
}
935935

936-
GOPHER_LOG_INFO("Initializing application with {} workers",
937-
config_.worker_threads);
936+
GOPHER_LOG_DEBUG("Initializing application with {} workers",
937+
config_.worker_threads);
938938

939939
// Create worker threads
940940
for (size_t i = 0; i < config_.worker_threads; ++i) {
@@ -964,7 +964,7 @@ class ApplicationBase {
964964
return true;
965965
}
966966

967-
GOPHER_LOG_INFO("Starting application workers");
967+
GOPHER_LOG_DEBUG("Starting application workers");
968968

969969
// Start worker threads
970970
for (size_t i = 0; i < workers_.size(); ++i) {
@@ -993,7 +993,7 @@ class ApplicationBase {
993993
* Run the main event loop
994994
*/
995995
virtual void run() {
996-
GOPHER_LOG_INFO("Running main event loop");
996+
GOPHER_LOG_DEBUG("Running main event loop");
997997

998998
// Main dispatcher should already be created in initialize()
999999
if (!main_dispatcher_) {
@@ -1020,7 +1020,7 @@ class ApplicationBase {
10201020
return;
10211021
}
10221022

1023-
GOPHER_LOG_INFO("Shutting down application");
1023+
GOPHER_LOG_DEBUG("Shutting down application");
10241024
shutdown_requested_ = true;
10251025
running_ = false; // Legacy API compatibility
10261026
initialized_ = false; // Legacy API compatibility
@@ -1058,7 +1058,7 @@ class ApplicationBase {
10581058
main_dispatcher_owned_.reset();
10591059
}
10601060

1061-
GOPHER_LOG_INFO("Application shutdown complete");
1061+
GOPHER_LOG_DEBUG("Application shutdown complete");
10621062
}
10631063

10641064
/**
@@ -1202,7 +1202,7 @@ class ApplicationBase {
12021202

12031203
private:
12041204
void run() {
1205-
GOPHER_LOG_INFO("Worker {} starting", name_);
1205+
GOPHER_LOG_DEBUG("Worker {} starting", name_);
12061206

12071207
// Create dispatcher for this thread
12081208
dispatcher_ = std::make_unique<event::LibeventDispatcher>(name_);
@@ -1213,7 +1213,7 @@ class ApplicationBase {
12131213
std::this_thread::sleep_for(std::chrono::milliseconds(1));
12141214
}
12151215

1216-
GOPHER_LOG_INFO("Worker {} stopped", name_);
1216+
GOPHER_LOG_DEBUG("Worker {} stopped", name_);
12171217
}
12181218

12191219
std::string name_;

0 commit comments

Comments
 (0)