]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon, osd: set subsystem prefix for logging MonCap and OSDCap 50312/head
authorRishabh Dave <ridave@redhat.com>
Wed, 8 Mar 2023 19:14:41 +0000 (00:44 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 11 Apr 2023 14:32:05 +0000 (20:02 +0530)
With this patch following is how log entries from MonCap.cc look -

    2023-04-10T22:15:25.746+0530 7fa5debf46c0 20 MonCap is_capable service=mon command= read addr v2:192.168.29.90:40719/0 on cap allow *
    2023-04-10T22:15:25.746+0530 7fa5debf46c0 20 MonCap  allow so far , doing grant allow *
    2023-04-10T22:15:25.746+0530 7fa5debf46c0 20 MonCap  allow all

And this is how same log entries from MonCap.cc look without this patch -

    2023-04-10T22:23:32.214+0530 7f1fb27f46c0 20 is_capable service=mon command= read addr v2:192.168.29.90:40164/0 on cap allow *
    2023-04-10T22:23:32.214+0530 7f1fb27f46c0 20  allow so far , doing grant allow *
    2023-04-10T22:23:32.214+0530 7f1fb27f46c0 20  allow all

Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/mon/MonCap.cc
src/osd/OSDCap.cc

index aa18d123925039c0b198542cf5fb01213c279571..f7af40de12c5af1a6626c16146db25f62d9b2fc1 100644 (file)
 
 #include "include/ceph_assert.h"
 
+#define dout_subsys ceph_subsys_mon
+
+#undef dout_prefix
+#define dout_prefix *_dout << "MonCap "
+
 using std::list;
 using std::map;
 using std::ostream;
index f847e80e337ada87cef234311d3406262d601991..1cec8b620022ccbdd77c98e8fc0b584913410d6e 100644 (file)
 #include "common/debug.h"
 #include "include/ipaddr.h"
 
+#define dout_subsys ceph_subsys_osd
+
+#undef dout_prefix
+#define dout_prefix *_dout << "OSDCap "
+
 using std::ostream;
 using std::string;
 using std::vector;