]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: improve a log message
authorRishabh Dave <ridave@redhat.com>
Wed, 17 Jul 2024 12:35:33 +0000 (18:05 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 29 Nov 2024 13:38:38 +0000 (19:08 +0530)
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 <ridave@redhat.com>
(cherry picked from commit e830f89240e382fdf5da676437ff783c4ea6ae42)

src/mgr/PyModuleRegistry.cc
src/mon/MgrMonitor.cc

index f5f5008023fc1009455bfce1723c13f5915f35ca..7e294d518b719a0b00b19114e96269397770cf70 100644 (file)
@@ -212,7 +212,7 @@ void PyModuleRegistry::active_start(
       continue;
     }
 
-    dout(4) << "Starting " << i.first << dendl;
+    dout(4) << "Starting module '" << i.first << "'" << dendl;
     active_modules->start_one(i.second);
   }
 }
index 580fd0da5fa9535733a7785ba11ca7673ea990d8..c1a59657a2e2738419c39ab6ffb9689e6208866c 100644 (file)
@@ -178,10 +178,12 @@ void MgrMonitor::create_initial()
   }
   pending_map.always_on_modules = always_on_modules;
   pending_command_descs = mgr_commands;
-  dout(10) << __func__ << " initial modules " << pending_map.modules
-          << ", always on modules " << pending_map.get_always_on_modules()
-           << ", " << pending_command_descs.size() << " commands"
+  dout(10) << __func__ << " initial enabled modules: " << pending_map.modules
           << dendl;
+  dout(10) << __func__ << "always on modules: " <<
+            pending_map.get_always_on_modules() << dendl;
+  dout(10) << __func__ << "total " << pending_command_descs.size() <<
+             " commands" << dendl;
 }
 
 void MgrMonitor::get_store_prefixes(std::set<string>& s) const