Skip to content

Commit e830f89

Browse files
mon/MgrMonitor: improve a log message
Following log message has 3 distinct information (enabled modules, modules that are alwats on and total number of commands enabled) printed on the same line which makes it hard to find one of the information and also makes it comparatively hard to read - 2024-07-17T17:21:16.609+0530 7f534ae006c0 0 mon.a@0(leader).mgr e0 create_initial initial modules iostat,nfs,volumes, always on modules balancer,crash,devicehealth,orchestrator,pg_autoscaler,progress,status,telemetry, 50 commands With this commit it would be easier to read and find needed info - 2024-07-17T17:21:16.609+0530 7f534ae006c0 0 mon.a@0(leader).mgr e0 create_initial initial modules: iostat,nfs,volumes 2024-07-17T17:21:16.609+0530 7f534ae006c0 0 mon.a@0(leader).mgr e0 create_initial always on modules: balancer,crash,devicehealth,orchestrator,pg_autoscaler,progress,status,telemetry 2024-07-17T17:21:16.609+0530 7f534ae006c0 0 mon.a@0(leader).mgr e0 create_initial 50 commands Signed-off-by: Rishabh Dave <[email protected]>
1 parent 4b54215 commit e830f89

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/mgr/PyModuleRegistry.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void PyModuleRegistry::active_start(
243243
continue;
244244
}
245245

246-
dout(4) << "Starting " << i.first << dendl;
246+
dout(4) << "Starting module '" << i.first << "'" << dendl;
247247
active_modules->start_one(i.second);
248248
}
249249
}

src/mon/MgrMonitor.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,12 @@ void MgrMonitor::create_initial()
146146
}
147147
pending_map.always_on_modules = always_on_modules();
148148
pending_command_descs = mgr_commands;
149-
dout(10) << __func__ << " initial modules " << pending_map.modules
150-
<< ", always on modules " << pending_map.get_always_on_modules()
151-
<< ", " << pending_command_descs.size() << " commands"
149+
dout(10) << __func__ << " initial enabled modules: " << pending_map.modules
152150
<< dendl;
151+
dout(10) << __func__ << "always on modules: " <<
152+
pending_map.get_always_on_modules() << dendl;
153+
dout(10) << __func__ << "total " << pending_command_descs.size() <<
154+
" commands" << dendl;
153155
}
154156

155157
void MgrMonitor::get_store_prefixes(std::set<string>& s) const

0 commit comments

Comments
 (0)