MXS-2014 Rename mxs_log_priority_is_enabled

- Renamed to mxs_log_is_priority_enabled
- That function instead of the macro is now consistently used
This commit is contained in:
Johan Wikman
2018-08-15 21:48:38 +03:00
parent 8ae2997c4e
commit 9a8bb95be6
12 changed files with 36 additions and 34 deletions

View File

@ -636,7 +636,7 @@ routeQuery(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session, GWBUF *queu
queue);
break;
case MXS_COM_QUERY:
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO))
if (mxs_log_is_priority_enabled(LOG_INFO))
{
trc = modutil_get_SQL(queue);
}

View File

@ -314,7 +314,7 @@ bool RWSplit::select_connect_backend_servers(MXS_SESSION *session,
auto cmpfun = criteria_cmpfun[select_criteria];
ss_dassert(cmpfun);
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO))
if (mxs_log_is_priority_enabled(LOG_INFO))
{
log_server_connections(select_criteria, backends);
}

View File

@ -41,7 +41,7 @@ public:
{
ss_info_dassert(buf, "Trx::add_stmt: Buffer must not be empty");
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO))
if (mxs_log_is_priority_enabled(LOG_INFO))
{
MXS_INFO("Adding to trx: %s", mxs::extract_sql(buf, 512).c_str());
}

View File

@ -106,7 +106,7 @@ bool connect_backend_servers(SSRBackendList& backends, MXS_SESSION* session)
int servers_connected = 0;
int slaves_connected = 0;
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO))
if (mxs_log_is_priority_enabled(LOG_INFO))
{
MXS_INFO("Servers and connection counts:");
@ -164,7 +164,7 @@ bool connect_backend_servers(SSRBackendList& backends, MXS_SESSION* session)
{
succp = true;
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO))
if (mxs_log_is_priority_enabled(LOG_INFO))
{
for (SSRBackendList::iterator it = backends.begin(); it != backends.end(); it++)
{

View File

@ -182,7 +182,7 @@ static void inspect_query(GWBUF* pPacket, uint32_t* type, qc_query_op_t* op, uin
break;
}
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO))
if (mxs_log_is_priority_enabled(LOG_INFO))
{
char *sql;
int sql_len;
@ -755,7 +755,7 @@ bool SchemaRouterSession::route_session_write(GWBUF* querybuf, uint8_t command)
(*it)->append_session_command(buffer, m_sent_sescmd);
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO))
if (mxs_log_is_priority_enabled(LOG_INFO))
{
MXS_INFO("Route query to %s\t%s:%d",
server_is_master((*it)->backend()->server) ? "master" : "slave",