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