The ceph log last command outputs all the cluster
logs generated from logm entries at DBG level,
irrespective of their log level. We must output
cluster logs generated from logm according
to the log level specified in the log last command.
Fixes: https://tracker.ceph.com/issues/57340
Signed-off-by: Prashant D <pdhange@redhat.com>
} else {
start = from;
}
- dout(10) << __func__ << " channnel " << p.first
+ dout(10) << __func__ << " channel " << p.first
<< " from " << from << " to " << to << dendl;
for (version_t v = start; v < to; ++v) {
bufferlist ebl;
entries.erase(entries.begin());
}
for (auto& p : entries) {
+ if (!match(p.second)) {
+ continue;
+ }
if (f) {
f->dump_object("entry", p.second);
} else {
LogEntry le;
auto p = ebl.cbegin();
decode(le, p);
- if (f) {
- f->dump_object("entry", le);
- } else {
- ss << le << "\n";
+ if (match(le)) {
+ if (f) {
+ f->dump_object("entry", le);
+ } else {
+ ss << le << "\n";
+ }
}
}
}