1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-30 07:23:07 +03:00

Add report_event() method into reporter object

Report event will write json formatted event into report
file.

Include Boost headers as system headers to avoid generating
excessive warnings. Enable extra tests for selected compilers
in actions.
This commit is contained in:
Teemu Ollakka
2022-09-08 14:21:22 +03:00
parent f8ff2cfdd4
commit de3d7b63ea
5 changed files with 128 additions and 31 deletions

View File

@ -57,6 +57,15 @@ namespace wsrep
*/
void report_progress(const std::string& json);
/**
* Report provider event.
* {
* "status": "Status string",
* "message": "Message from the provider"
* }
*/
void report_event(const std::string& json);
enum log_level
{
error,
@ -100,14 +109,17 @@ namespace wsrep
std::deque<log_msg> err_msg_;
std::deque<log_msg> warn_msg_;
std::deque<log_msg> events_;
size_t const max_msg_;
static void write_log_msgs(std::ostream& os,
const std::string& label,
const std::deque<log_msg>& msgs);
static void write_log_msg(std::ostream& os,
const log_msg& msg);
const log_msg& msg);
static void write_event(std::ostream& os,
const log_msg& msg);
static void write_array(std::ostream& os, const std::string& label,
const std::deque<log_msg>& events,
void (*element_writer)(std::ostream& os,
const log_msg& msg));
substates substate_map(enum server_state::state state);
float progress_map(float progress) const;
void write_file(double timestamp);