health_check_t& add(const std::string& code,
health_status_t severity,
const std::string& summary) {
- assert(checks.count(code) == 0);
+ ceph_assert(checks.count(code) == 0);
health_check_t& r = checks[code];
r.severity = severity;
r.summary = summary;
}
}
- void dump_detail(Formatter *f, std::string *plain, bool compat) const {
+ void dump_detail(std::string *plain) const {
for (auto& p : checks) {
- if (f) {
- if (compat) {
- // this is sloppy, but the best we can do: just dump all of the
- // individual checks' details together
- for (auto& d : p.second.detail) {
- f->dump_string("item", d);
- }
- }
- } else {
- if (!compat) {
- *plain += p.first + " " + p.second.summary + "\n";
- }
- for (auto& d : p.second.detail) {
- if (!compat) {
- *plain += " ";
- }
- *plain += d;
- *plain += "\n";
- }
+ *plain += p.first + " " + p.second.summary + "\n";
+ for (auto& d : p.second.detail) {
+ *plain += " ";
+ *plain += d;
+ *plain += "\n";
}
}
}