LOGIF removed from maxinfo.

This commit is contained in:
Johan Wikman 2015-11-17 10:11:41 +02:00
parent fb443a9f92
commit 1b8719ffed
2 changed files with 18 additions and 34 deletions

View File

@ -125,10 +125,7 @@ version()
void
ModuleInit()
{
LOGIF(LM, (skygw_log_write(
LOGFILE_MESSAGE,
"Initialise MaxInfo router module %s.\n",
version_str)));
MXS_NOTICE("Initialise MaxInfo router module %s.", version_str);
spinlock_init(&instlock);
instances = NULL;
}
@ -172,12 +169,7 @@ int i;
{
for (i = 0; options[i]; i++)
{
{
LOGIF(LE, (skygw_log_write(
LOGFILE_ERROR,
"Unknown option for MaxInfo '%s'\n",
options[i])));
}
MXS_ERROR("Unknown option for MaxInfo '%s'", options[i]);
}
}
@ -389,9 +381,8 @@ char *sql;
case COM_STATISTICS:
return maxinfo_statistics(instance, session, queue);
default:
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
"maxinfo: Unexpected MySQL command 0x%x",
MYSQL_COMMAND(queue))));
MXS_ERROR("maxinfo: Unexpected MySQL command 0x%x",
MYSQL_COMMAND(queue));
}
}
@ -619,9 +610,8 @@ maxinfo_execute_query(INFO_INSTANCE *instance, INFO_SESSION *session, char *sql)
MAXINFO_TREE *tree;
PARSE_ERROR err;
LOGIF(LT, (skygw_log_write(LOGFILE_TRACE,
"maxinfo: SQL statement: '%s' for 0x%p.",
sql, session->dcb)));
MXS_INFO("maxinfo: SQL statement: '%s' for 0x%p.",
sql, session->dcb);
if (strcmp(sql, "select @@version_comment limit 1") == 0)
{
respond_vercom(session->dcb);
@ -657,10 +647,7 @@ PARSE_ERROR err;
if ((tree = maxinfo_parse(sql, &err)) == NULL)
{
maxinfo_send_parse_error(session->dcb, sql, err);
LOGIF(LM, (skygw_log_write(
LOGFILE_MESSAGE,
"Failed to parse SQL statement: '%s'.",
sql)));
MXS_NOTICE("Failed to parse SQL statement: '%s'.", sql);
}
else
maxinfo_execute(session->dcb, tree);
@ -755,8 +742,7 @@ maxinfo_add_mysql_user(SERVICE *service) {
char *service_passwd = NULL;
if (serviceGetUser(service, &service_user, &service_passwd) == 0) {
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
"maxinfo: failed to get service user details")));
MXS_ERROR("maxinfo: failed to get service user details");
return 1;
}
@ -764,9 +750,8 @@ maxinfo_add_mysql_user(SERVICE *service) {
dpwd = decryptPassword(service->credentials.authdata);
if (!dpwd) {
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
"maxinfo: decrypt password failed for service user %s",
service_user)));
MXS_ERROR("maxinfo: decrypt password failed for service user %s",
service_user);
return 1;
}
@ -776,9 +761,8 @@ maxinfo_add_mysql_user(SERVICE *service) {
newpasswd = create_hex_sha1_sha1_passwd(dpwd);
if (!newpasswd) {
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
"maxinfo: create hex_sha1_sha1_password failed for service user %s",
service_user)));
MXS_ERROR("maxinfo: create hex_sha1_sha1_password failed for service user %s",
service_user);
users_free(service->users);
service->users = NULL;
return 1;

View File

@ -293,7 +293,7 @@ char errmsg[120];
tree->value[80] = 0;
sprintf(errmsg, "Unsupported show command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE, "%s", errmsg)));
MXS_NOTICE("%s", errmsg);
}
/**
@ -345,7 +345,7 @@ exec_flush(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported flush command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, "%s", errmsg);
MXS_ERROR("%s", errmsg);
}
/**
@ -425,7 +425,7 @@ exec_set(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported set command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, "%s", errmsg);
MXS_ERROR("%s", errmsg);
}
/**
@ -505,7 +505,7 @@ exec_clear(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported clear command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, "%s", errmsg);
MXS_ERROR("%s", errmsg);
}
extern void shutdown_server();
@ -627,7 +627,7 @@ exec_shutdown(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported shutdown command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, "%s", errmsg);
MXS_ERROR("%s", errmsg);
}
/**
@ -735,7 +735,7 @@ exec_restart(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported restart command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, "%s", errmsg);
MXS_ERROR("%s", errmsg);
}
/**