1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-11-01 17:51:06 +03:00

Debug log level implementation

Debug log will now filter output based on debug level that is enabled.
This commit is contained in:
mkaruza
2019-02-12 10:44:26 +01:00
committed by Teemu Ollakka
parent 510c7f767f
commit be98517cb3
9 changed files with 131 additions and 74 deletions

View File

@@ -454,15 +454,15 @@ void wsrep::client_state::update_last_written_gtid(const wsrep::gtid& gtid)
void wsrep::client_state::debug_log_state(const char* context) const
{
if (debug_log_level() >= 1)
{
wsrep::log_debug() << context
<< "(" << id_.get()
<< "," << to_c_string(state_)
<< "," << to_c_string(mode_)
<< "," << wsrep::to_string(current_error_)
<< ")";
}
WSREP_LOG_DEBUG(debug_log_level(),
wsrep::log::debug_level_client_state,
context
<< "(" << id_.get()
<< "," << to_c_string(state_)
<< "," << to_c_string(mode_)
<< "," << wsrep::to_string(current_error_)
<< ")");
}
void wsrep::client_state::state(