]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
log: fix event gather condition
authorSage Weil <sage@inktank.com>
Mon, 16 Jul 2012 22:40:53 +0000 (15:40 -0700)
committerSage Weil <sage@inktank.com>
Mon, 16 Jul 2012 22:36:44 +0000 (15:36 -0700)
We should gather an event if it is below the log or gather threshold.

Previously we were only gathering if we were going to print it, which makes
the dump no more useful than what was already logged.

Signed-off-by: Sage Weil <sage@inktank.com>
src/log/SubsystemMap.h

index 70f1246ebe74ee6943e9190ec5bed31c4e7ebf1c..d40552de2c121d02fcf42f9feb60bee902358f2a 100644 (file)
@@ -58,7 +58,8 @@ public:
 
   bool should_gather(unsigned sub, int level) {
     assert(sub < m_subsys.size());
-    return level <= m_subsys[sub].log_level;
+    return level <= m_subsys[sub].gather_level ||
+      level <= m_subsys[sub].log_level;
   }
 };