]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
dout: dlog_p macro for should_gather
authorMatt Benjamin <matt@cohortfs.com>
Thu, 4 Sep 2014 15:15:38 +0000 (11:15 -0400)
committerMatt Benjamin <matt@cohortfs.com>
Wed, 14 Jan 2015 21:40:26 +0000 (16:40 -0500)
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
Signed-off-by: Casey Bodley <casey@linuxbox.com>
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
src/common/debug.h
src/common/dout.h

index 7d5a785d38a5e6c57acdddf3798d16852639e164..1f4f8c66a09aeb81705deab275c2616afcd96307 100644 (file)
@@ -24,6 +24,8 @@
 
 #define pdout(v, p) lpdout((g_ceph_context), v, p)
 
+#define dlog_p(sub, v) ldlog_p1((g_ceph_context), sub, v)
+
 #define generic_dout(v) lgeneric_dout((g_ceph_context), v)
 
 #define derr lderr((g_ceph_context))
index f5536ac9f2218db196acf1691b7666e1bdaee6dd..f00e4f63df7ccb108071d74fd7124c566c6b38c4 100644 (file)
@@ -61,6 +61,9 @@ inline std::ostream& operator<<(std::ostream& out, _bad_endl_use_dendl_t) {
 #define lgeneric_dout(cct, v) dout_impl(cct, ceph_subsys_, v) *_dout
 #define lgeneric_derr(cct) dout_impl(cct, ceph_subsys_, -1) *_dout
 
+#define ldlog_p1(cct, sub, lvl)                 \
+  (cct->_conf->subsys.should_gather((sub), (lvl)))
+
 // NOTE: depend on magic value in _ASSERT_H so that we detect when
 // /usr/include/assert.h clobbers our fancier version.
 #define dendl std::flush;                              \