Updated logging messages
Updated logging messages
This commit is contained in:
@ -159,10 +159,12 @@ GWBUF *buf;
|
||||
return;
|
||||
}
|
||||
router->master->remote = strdup(router->service->dbref->server->name);
|
||||
LOGIF(LM,(skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"%s: attempting to connect to master server %s.",
|
||||
router->service->name, router->master->remote)));
|
||||
|
||||
LOGIF(LM,(skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"%s: attempting to connect to master server %s:%d, binlog %s, pos %lu",
|
||||
router->service->name, router->service->dbref->server->name, router->service->dbref->server->port, router->binlog_name, router->binlog_position)));
|
||||
|
||||
router->connect_time = time(0);
|
||||
|
||||
if (setsockopt(router->master->fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive , sizeof(keepalive )))
|
||||
@ -581,12 +583,13 @@ char query[128];
|
||||
buf = blr_make_binlog_dump(router);
|
||||
router->master_state = BLRM_BINLOGDUMP;
|
||||
router->master->func.write(router->master, buf);
|
||||
LOGIF(LM,(skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"%s: Request binlog records from %s at "
|
||||
"position %d from master server %s.",
|
||||
LOGIF(LM,(skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"%s: Request binlog records from %s at "
|
||||
"position %lu from master server %s:%d",
|
||||
router->service->name, router->binlog_name,
|
||||
router->binlog_position, router->master->remote)));
|
||||
router->binlog_position, router->master->remote,
|
||||
router->service->dbref->server->port)));
|
||||
break;
|
||||
case BLRM_BINLOGDUMP:
|
||||
// Main body, we have received a binlog record from the master
|
||||
|
@ -2201,13 +2201,15 @@ static int
|
||||
blr_stop_slave(ROUTER_INSTANCE* router, ROUTER_SLAVE* slave)
|
||||
{
|
||||
GWBUF *ptr;
|
||||
|
||||
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE, "%s: STOP SLAVE received by %s@%s. Disconnecting from master %s:%d",
|
||||
router->service->name,
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"%s: STOP SLAVE received by %s@%s. Disconnecting from master %s:%d, read up to log %s, pos %lu",
|
||||
router->service->name,
|
||||
slave->dcb->user,
|
||||
slave->dcb->remote,
|
||||
router->service->dbref->server->name,
|
||||
router->service->dbref->server->port)));
|
||||
router->service->dbref->server->port,
|
||||
router->binlog_name, router->binlog_position)));
|
||||
|
||||
if (router->master_state != BLRM_SLAVE_STOPPED) {
|
||||
|
||||
@ -2257,12 +2259,15 @@ blr_stop_slave(ROUTER_INSTANCE* router, ROUTER_SLAVE* slave)
|
||||
static int
|
||||
blr_start_slave(ROUTER_INSTANCE* router, ROUTER_SLAVE* slave)
|
||||
{
|
||||
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE, "%s: START SLAVE received by %s@%s. Trying connection to master %s:%d",
|
||||
router->service->name,
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"%s: START SLAVE received by %s@%s. Trying connection to master %s:%d, binlog %s, pos %lu",
|
||||
router->service->name,
|
||||
slave->dcb->user,
|
||||
slave->dcb->remote,
|
||||
router->service->dbref->server->name,
|
||||
router->service->dbref->server->port)));
|
||||
router->service->dbref->server->port,
|
||||
router->binlog_name, router->binlog_position)));
|
||||
|
||||
if ( (router->master_state == BLRM_UNCONNECTED) || (router->master_state == BLRM_SLAVE_STOPPED) ) {
|
||||
|
||||
|
Reference in New Issue
Block a user