]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | #ifndef CEPH_HTML_FORMATTER_H | |
4 | #define CEPH_HTML_FORMATTER_H | |
5 | ||
7c673cae FG |
6 | #include "Formatter.h" |
7 | ||
8 | namespace ceph { | |
9 | class HTMLFormatter : public XMLFormatter { | |
10 | public: | |
11 | explicit HTMLFormatter(bool pretty = false); | |
12 | ~HTMLFormatter() override; | |
13 | void reset() override; | |
14 | ||
15 | void set_status(int status, const char* status_name) override; | |
16 | void output_header() override; | |
17 | ||
9f95a23c TL |
18 | void dump_unsigned(std::string_view name, uint64_t u) override; |
19 | void dump_int(std::string_view name, int64_t u) override; | |
20 | void dump_float(std::string_view name, double d) override; | |
21 | void dump_string(std::string_view name, std::string_view s) override; | |
22 | std::ostream& dump_stream(std::string_view name) override; | |
23 | void dump_format_va(std::string_view name, const char *ns, bool quoted, const char *fmt, va_list ap) override; | |
7c673cae FG |
24 | |
25 | /* with attrs */ | |
9f95a23c | 26 | void dump_string_with_attrs(std::string_view name, std::string_view s, const FormatterAttrs& attrs) override; |
7c673cae | 27 | private: |
9f95a23c | 28 | template <typename T> void dump_template(std::string_view name, T arg); |
7c673cae FG |
29 | |
30 | int m_status; | |
31 | const char* m_status_name; | |
32 | }; | |
33 | ||
34 | } | |
35 | ||
36 | #endif |