]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix the priority filter.
authorJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 18 May 2012 18:32:43 +0000 (11:32 -0700)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 18 May 2012 18:32:43 +0000 (11:32 -0700)
When a given log level L was specified, we would reply with all the
messages of "level L and below"; for instance, for a 'log-error' we would
present all the messages of level 'error', 'warn', 'sec', 'info' and
'debug'.

We shouldn't be doing it that way, so we just inverted the filter
condition. Now we show only 'L and above'; i.e., for a log level of
'log-warn', show only 'log-warn' and 'log-error'.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/mon/LogMonitor.cc

index 5e987778678a9f6e19f4b3e2c4bb8c801e817359..e126b746776a43197ffe7d14cbba801d431b0cdf 100644 (file)
@@ -415,7 +415,7 @@ bool LogMonitor::_create_sub_summary(MLog *mlog, int level)
   list<LogEntry>::reverse_iterator it = summary.tail.rbegin();
   for (; it != summary.tail.rend(); it++) {
     LogEntry e = *it;
-    if (e.type > level)
+    if (e.type < level)
       continue;
 
     mlog->entries.push_back(e);
@@ -457,7 +457,7 @@ bool LogMonitor::_create_sub_incremental(MLog *mlog, int level, version_t sv)
       LogEntry le;
       le.decode(p);
 
-      if (level < le.type) {
+      if (le.type < level) {
        dout(20) << __func__ << " requested " << level 
                 << " entry " << le.type << dendl;
        continue;