From: Matt Benjamin Date: Thu, 4 Sep 2014 15:15:38 +0000 (-0400) Subject: dout: dlog_p macro for should_gather X-Git-Tag: v0.93~265^2~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2401c3ba90c8256a1d3de102a8fbd28b5e9ca567;p=ceph.git dout: dlog_p macro for should_gather Signed-off-by: Matt Benjamin Signed-off-by: Casey Bodley Signed-off-by: Matt Benjamin --- diff --git a/src/common/debug.h b/src/common/debug.h index 7d5a785d38a..1f4f8c66a09 100644 --- a/src/common/debug.h +++ b/src/common/debug.h @@ -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)) diff --git a/src/common/dout.h b/src/common/dout.h index f5536ac9f22..f00e4f63df7 100644 --- a/src/common/dout.h +++ b/src/common/dout.h @@ -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; \