-
#include <syslog.h>
-
#include <boost/algorithm/string/predicate.hpp>
#include "LogEntry.h"
#include "Formatter.h"
-
#include "include/stringify.h"
// ----
::decode(who, bl);
::decode(stamp, bl);
::decode(seq, bl);
+ _calc_hash();
}
void LogEntryKey::dump(Formatter *f) const
void LogEntry::encode(bufferlist& bl, uint64_t features) const
{
- ENCODE_START(3, 2, bl);
+ ENCODE_START(4, 2, bl);
__u16 t = prio;
::encode(who, bl, features);
::encode(stamp, bl);
::encode(t, bl);
::encode(msg, bl);
::encode(channel, bl);
+ ::encode(name, bl);
ENCODE_FINISH(bl);
}
void LogEntry::decode(bufferlist::iterator& bl)
{
- DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, bl);
+ DECODE_START_LEGACY_COMPAT_LEN(4, 2, 2, bl);
__u16 t;
::decode(who, bl);
::decode(stamp, bl);
// clue of what a 'channel' is.
channel = CLOG_CHANNEL_CLUSTER;
}
+ if (struct_v >= 4) {
+ ::decode(name, bl);
+ }
DECODE_FINISH(bl);
}
void LogEntry::dump(Formatter *f) const
{
f->dump_stream("who") << who;
+ f->dump_stream("name") << name;
f->dump_stream("stamp") << stamp;
f->dump_unsigned("seq", seq);
f->dump_string("channel", channel);
::decode(version, bl);
::decode(tail, bl);
DECODE_FINISH(bl);
+ keys.clear();
+ for (auto& p : tail) {
+ keys.insert(p.key());
+ }
}
void LogSummary::dump(Formatter *f) const